Class User_Model
Contains current user's methods.
-
CI_Model
-
User_Model
Methods summary
public
|
|
public
array
|
#
get_settings( numeric $user_id )
Returns the user settings from the database.
Returns the user settings from the database.
Parameters
- $user_id
numeric $user_id User record id of which the settings will be returned.
Returns
array Returns an array with user settings.
|
public
boolean
|
#
save_settings( array $user )
This method saves the user settings into the database.
This method saves the user settings into the database.
Parameters
- $user
array $user Contains the current users settings.
Returns
boolean Returns the operation result.
|
public
string
|
#
get_salt( string $username )
Retrieve user's salt from database.
Retrieve user's salt from database.
Parameters
- $username
string $username This will be used to find the user record.
Returns
string Returns the salt db value.
|
public
array|null
|
#
check_login( string $username, type $password )
Performs the check of the given user credentials.
Performs the check of the given user credentials.
Parameters
- $username
string $username Given user's name.
- $password
type $password Given user's password (not hashed yet).
Returns
array|null Returns the session data of the logged in user or null on failure.
|
public
string
|
#
get_user_display_name( numeric $user_id )
Get the given user's display name (first + last name).
Get the given user's display name (first + last name).
Parameters
- $user_id
numeric $user_id The given user record id.
Returns
string Returns the user display name.
|
public
string|boolean
|
#
regenerate_password( string $username, string $email )
If the given arguments correspond to an existing user record, generate a new
password and send it with an email.
If the given arguments correspond to an existing user record, generate a new
password and send it with an email.
Parameters
- $username
string $username
- $email
string $email
Returns
string|boolean Returns the new password on success or FALSE on failure.
|