/var/www/vhosts/ihelp.ro/httpdocs/src/Model/Table
Edit: /var/www/vhosts/ihelp.ro/httpdocs/src/Model/Table/UserSocialsTable.php (783B)
addBehavior('Timestamp');
$this->belongsTo('Users');
}
public function add_social_account($socialData, $userId)
{
$userSocialEntity = $this->newEmptyEntity();
$userSocialEntity['user_id'] = $userId;
$userSocialEntity['type'] = $socialData['type'];
$userSocialEntity['socialid'] = $socialData['id'];
if (!empty($socialData['access_token'])) {
$userSocialEntity['access_token'] = $socialData['access_token'];
}
if (!empty($socialData['access_secret'])) {
$userSocialEntity['access_secret'] = $socialData['access_secret'];
}
$this->save($userSocialEntity, ['validate' => false]);
}
}