OrmAuth ORM driven login driver

package Fuel
subpackage Auth

 Methods

_init()

_init() 

Change a user's password

change_password($old_password, $new_password, string $username) : bool

Parameters

$old_password

string

$new_password

string

$username

string

username or null for current user

Returns

bool

Create new user

create_user($username, $password, string $email, int $group, array $profile_fields) : bool

Parameters

$username

string

$password

string

$email

string

must contain valid email address

$group

int

group id

$profile_fields

Array

Returns

bool

Deletes a given user

delete_user($username) : bool

Parameters

$username

string

Returns

bool

Getter for user data.

get(string $field, mixed $default) : mixed

Parameters

$field

string

name of the user field to return

$default

mixed

value to return if the field requested does not exist

Returns

mixed

Get the user's emailaddress

get_email() : string

Returns

string

Get the user's groups

get_groups() : Array

Returns

Arraycontaining the group driver ID & the user's group ID

for compatibility, will map to the user metadata

get_profile_fields($field, $default) : Array

Parameters

$field

$default

Returns

Array

Get the user's screen name

get_screen_name() : string

Returns

string

Get the user object

get_user() : mixed

Returns

mixedModel\Auth_User object, or false if no user is set

Get the user's ID

get_user_id() : Array

Returns

Arraycontaining this driver's ID & the user's ID

Extension of base driver method to default to user group instead of user id

has_access($condition, $driver, $user) 

Parameters

$condition

$driver

$user

Logout user

logout() : bool

Returns

bool

Generates new random password, sets it for the given username and returns the new password.

reset_password(string $username) : string

To be used for resetting a user's forgotten password, should be emailed afterwards.

Parameters

$username

string

Returns

string

Update a user's properties Note: Username cannot be updated, to update password the old password must be passed as old_password

update_user(Array $values, $username) : bool

Parameters

$values

Array

properties to be updated including profile fields

$username

string

Returns

bool

Check the user exists

validate_user($username_or_email, $password) : bool

Parameters

$username_or_email

$password

Returns

bool

Check for login

perform_check() : bool

Returns

bool

 Properties

 

<p>Ormauth class config</p>

$config : array

 

<p>Simpleauth compatible permissions array for the current logged-in user</p>

$permissions : array

 

<p>user object for the current user</p>

$user : \Model\Auth_User