PHP Class CakeDC\Users\Model\Behavior\SocialBehavior

Inheritance: extends Behavior, use trait CakeDC\Users\Traits\RandomStringTrait
Afficher le fichier Open project: cakedc/users

Méthodes publiques

Méthode Description
generateUniqueUsername ( string $username ) : string Checks if username exists and generate a new one
socialLogin ( array $data, array $options ) : boolean | Cake\Datasource\EntityInterface | mixed Performs social login

Méthodes protégées

Méthode Description
_createSocialUser ( array $data, array $options = [] ) : boolean | Cake\Datasource\EntityInterface | mixed Creates social user, populate the user data based on the social login data first and save it
_populateUser ( array $data, Cake\Datasource\EntityInterface $existingUser, string $useEmail, string $validateEmail, string $tokenExpiration ) : Cake\Datasource\EntityInterface Build new user entity either by using an existing user or extracting the data from the social login data to create a new one

Method Details

_createSocialUser() protected méthode

Creates social user, populate the user data based on the social login data first and save it
protected _createSocialUser ( array $data, array $options = [] ) : boolean | Cake\Datasource\EntityInterface | mixed
$data array Array social user.
$options array Array option data.
Résultat boolean | Cake\Datasource\EntityInterface | mixed result of the save operation

_populateUser() protected méthode

Build new user entity either by using an existing user or extracting the data from the social login data to create a new one
protected _populateUser ( array $data, Cake\Datasource\EntityInterface $existingUser, string $useEmail, string $validateEmail, string $tokenExpiration ) : Cake\Datasource\EntityInterface
$data array Array social login.
$existingUser Cake\Datasource\EntityInterface user data.
$useEmail string email to use.
$validateEmail string email to validate.
$tokenExpiration string token_expires data.
Résultat Cake\Datasource\EntityInterface

generateUniqueUsername() public méthode

Checks if username exists and generate a new one
public generateUniqueUsername ( string $username ) : string
$username string username data.
Résultat string

socialLogin() public méthode

Performs social login
public socialLogin ( array $data, array $options ) : boolean | Cake\Datasource\EntityInterface | mixed
$data array Array social login.
$options array Array option data.
Résultat boolean | Cake\Datasource\EntityInterface | mixed