Jelix 1.8.12

jIAuthDriver3 extends jIAuthDriver2
in

interface for auth drivers

Tags
subpackage

auth

since
1.6.37

Table of Contents

__construct()  : mixed
constructor.
canChangePassword()  : bool
Indicate if the password can be changed technically.
changePassword()  : bool
change a user password.
createUserObject()  : object
creates a new user object, with some first data.. Careful : it doesn't create a user in a database for example. Just an object.
getReasonToForbiddenPasswordChange()  : string
Get the reason to the forbidden password change
getUser()  : object
return user data corresponding to the given login.
getUserList()  : array<string|int, object>
construct the user list.
removeUser()  : mixed
Erase user data of the user $login.
saveNewUser()  : mixed
store a new user.
updateUser()  : mixed
save updated data of a user warning : should not save the password !
verifyPassword()  : false|object
verify that the password correspond to the login.

Methods

__construct()

constructor.

public __construct(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

driver parameters, written in the ini file of the auth plugin

Tags
Return values
mixed

canChangePassword()

Indicate if the password can be changed technically.

public canChangePassword(string $login) : bool

Not related to rights with jAcl2

Parameters
$login : string

the login of the user

Tags
Return values
bool

changePassword()

change a user password.

public changePassword(string $login, string $newpassword) : bool
Parameters
$login : string

the login of the user

$newpassword : string
Tags
Return values
bool

true if the password has been changed

createUserObject()

creates a new user object, with some first data.. Careful : it doesn't create a user in a database for example. Just an object.

public createUserObject(string $login, string $password) : object
Parameters
$login : string

the user login

$password : string

the user password

Tags
Return values
object

the returned object depends on the driver

getReasonToForbiddenPasswordChange()

Get the reason to the forbidden password change

public getReasonToForbiddenPasswordChange() : string

It can return the reason only after the call of jIAuthDriver2::canChangePassword()

Tags
Return values
string

getUser()

return user data corresponding to the given login.

public getUser(string $login) : object
Parameters
$login : string

the login of the user

Tags
Return values
object

the user data container

getUserList()

construct the user list.

public getUserList(string $pattern) : array<string|int, object>
Parameters
$pattern : string

'' for all users

Tags
Return values
array<string|int, object>

array of objects representing the users

removeUser()

Erase user data of the user $login.

public removeUser(string $login) : mixed
Parameters
$login : string

the login of the user to remove

Tags
Return values
mixed

saveNewUser()

store a new user.

public saveNewUser(object $user) : mixed

It create the user in a database for example should be call after a call of createUser and after setting some of its properties...

Parameters
$user : object

the user data container

Tags
Return values
mixed

updateUser()

save updated data of a user warning : should not save the password !

public updateUser(object $user) : mixed
Parameters
$user : object

the user data container

Tags
Return values
mixed

verifyPassword()

verify that the password correspond to the login.

public verifyPassword(string $login, string $password) : false|object
Parameters
$login : string

the login of the user

$password : string

the password to test

Tags
Return values
false|object

returns the object representing the user

Search results