Jelix 1.6.40

jIAuthDriver2 extends jIAuthDriver
in

interface for auth drivers

Tags
subpackage

auth

static
since
1.6.21

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.
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()  : object|false
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

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

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
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

Return values
object

the returned object depends on the driver

getUser()

return user data corresponding to the given login

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

the login of the user

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

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

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

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

Return values
mixed

verifyPassword()

verify that the password correspond to the login

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

the login of the user

$password : string

the password to test

Return values
object|false

returns the object representing the user

Search results