Class humhub\modules\user\authclient\AuthClientHelpers
Inheritance | humhub\modules\user\authclient\AuthClientHelpers |
---|---|
Available since version | 1.1 |
AuthClientHelper provides helper functions fo auth clients
Public Methods
Method Details
Populates a Registration model with the information provided by the given AuthClient
public static boolean|humhub\modules\user\models\forms\Registration|null createRegistration ( \yii\authclient\ClientInterface $authClient ) | ||
$authClient | \yii\authclient\ClientInterface |
Automatically creates user by auth client attributes
public static humhub\modules\user\models\User createUser ( \yii\authclient\ClientInterface $authClient ) | ||
$authClient | \yii\authclient\BaseClient | |
return | humhub\modules\user\models\User | The created user |
---|
Returns AuthClients used by given User
public static \yii\authclient\ClientInterface[] getAuthClientsByUser ( humhub\modules\user\models\User $user ) | ||
$user | humhub\modules\user\models\User | |
return | \yii\authclient\ClientInterface[] | The users authclients |
---|
Returns a list of all synchornized user attributes
public static array getSyncAttributesByUser ( humhub\modules\user\models\User $user ) | ||
$user | humhub\modules\user\models\User | |
return | array | Attribute names |
---|
Returns the user object which is linked against given authClient
public static humhub\modules\user\models\User getUserByAuthClient ( \yii\authclient\ClientInterface $authClient ) | ||
$authClient | \yii\authclient\ClientInterface | The authClient |
return | humhub\modules\user\models\User | The user model or null if not found |
---|
Returns all users which are using an given authclient
public static \yii\db\ActiveQuery getUsersByAuthClient ( \yii\authclient\ClientInterface $authClient ) | ||
$authClient | \yii\authclient\ClientInterface |
Removes Authclient for a user
public static void removeAuthClientForUser ( \yii\authclient\ClientInterface $authClient, humhub\modules\user\models\User $user ) | ||
$authClient | \yii\authclient\BaseClient | |
$user | humhub\modules\user\models\User |
Stores an authClient to an user record
public static void storeAuthClientForUser ( \yii\authclient\ClientInterface $authClient, humhub\modules\user\models\User $user ) | ||
$authClient | \yii\authclient\BaseClient | |
$user | humhub\modules\user\models\User |
Updates (or creates) a user in HumHub using AuthClients Attributes This method will be called after login or by cron sync.
public static boolean updateUser ( \yii\authclient\ClientInterface $authClient, humhub\modules\user\models\User $user = null ) | ||
$authClient | \yii\authclient\BaseClient | |
$user | humhub\modules\user\models\User | |
return | boolean | Succeed |
---|