PHP Trait Adldap\Laravel\Traits\ImportsUsers

Afficher le fichier Open project: adldap2/adldap2-laravel

Méthodes publiques

Méthode Description
createModel ( ) : Model Returns the authentication users model instance.

Méthodes protégées

Méthode Description
bindAdldapToModel ( User $user, Model $model ) : Model Binds the Adldap User instance to the Eloquent model instance by setting its adldapUser public property.
findOrCreateModelFromAdldap ( User $user ) : Model Finds an Eloquent model from the specified Adldap user.
getBindUserToModel ( ) : boolean Returns the configured bind user to model option for binding the Adldap user model instance to the laravel model.
getModelFromAdldap ( User $user, string | null $password = null ) : Model Returns an existing or new Eloquent user from the specified Adldap user instance.
getOnlyAllowImportedUsers ( ) : mixed Returns the configured option for only allowing manually imported users to authenticate.
getPasswordSync ( ) : boolean Returns the configured password sync configuration option.
getSyncAttributes ( ) : array Returns the configured sync attributes for filling the Laravel user model with active directory fields.
handleAttributeCallback ( User $user, string $callback ) : mixed Handles retrieving the value from an attribute callback.
handleAttributeRetrieval ( User $user, string $field ) : string | null Handles retrieving the specified field from the User model.
isAttributeCallback ( string $string ) : boolean Returns true / false if the specified string is a callback for an attribute handler.
newEloquentQuery ( string $key, string $username ) : Builder Returns a new Eloquent user query.
syncModelFromAdldap ( User $user, Model $model ) : Model Fills a models attributes by the specified Users attributes.
syncModelPassword ( Model $model, string $password ) : Model Syncs the models password with the specified password.

Method Details

bindAdldapToModel() protected méthode

Binds the Adldap User instance to the Eloquent model instance by setting its adldapUser public property.
protected bindAdldapToModel ( User $user, Model $model ) : Model
$user Adldap\Models\User
$model Illuminate\Database\Eloquent\Model
Résultat Illuminate\Database\Eloquent\Model

createModel() abstract public méthode

Returns the authentication users model instance.
abstract public createModel ( ) : Model
Résultat Illuminate\Database\Eloquent\Model

findOrCreateModelFromAdldap() protected méthode

Finds an Eloquent model from the specified Adldap user.
protected findOrCreateModelFromAdldap ( User $user ) : Model
$user Adldap\Models\User
Résultat Illuminate\Database\Eloquent\Model

getBindUserToModel() protected méthode

Returns the configured bind user to model option for binding the Adldap user model instance to the laravel model.
protected getBindUserToModel ( ) : boolean
Résultat boolean

getModelFromAdldap() protected méthode

Returns an existing or new Eloquent user from the specified Adldap user instance.
protected getModelFromAdldap ( User $user, string | null $password = null ) : Model
$user Adldap\Models\User
$password string | null
Résultat Illuminate\Database\Eloquent\Model

getOnlyAllowImportedUsers() protected méthode

Returns the configured option for only allowing manually imported users to authenticate.
protected getOnlyAllowImportedUsers ( ) : mixed
Résultat mixed

getPasswordSync() protected méthode

Returns the configured password sync configuration option.
protected getPasswordSync ( ) : boolean
Résultat boolean

getSyncAttributes() protected méthode

Returns the configured sync attributes for filling the Laravel user model with active directory fields.
protected getSyncAttributes ( ) : array
Résultat array

handleAttributeCallback() protected méthode

Handles retrieving the value from an attribute callback.
protected handleAttributeCallback ( User $user, string $callback ) : mixed
$user Adldap\Models\User
$callback string
Résultat mixed

handleAttributeRetrieval() protected méthode

Handles retrieving the specified field from the User model.
protected handleAttributeRetrieval ( User $user, string $field ) : string | null
$user Adldap\Models\User
$field string
Résultat string | null

isAttributeCallback() protected méthode

Returns true / false if the specified string is a callback for an attribute handler.
protected isAttributeCallback ( string $string ) : boolean
$string string
Résultat boolean

newEloquentQuery() protected méthode

Returns a new Eloquent user query.
protected newEloquentQuery ( string $key, string $username ) : Builder
$key string
$username string
Résultat Illuminate\Database\Eloquent\Builder

syncModelFromAdldap() protected méthode

Fills a models attributes by the specified Users attributes.
protected syncModelFromAdldap ( User $user, Model $model ) : Model
$user Adldap\Models\User
$model Illuminate\Database\Eloquent\Model
Résultat Illuminate\Database\Eloquent\Model

syncModelPassword() protected méthode

Syncs the models password with the specified password.
protected syncModelPassword ( Model $model, string $password ) : Model
$model Illuminate\Database\Eloquent\Model
$password string
Résultat Illuminate\Database\Eloquent\Model