QVCI Library 3.2
 All Classes Namespaces Functions
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
qvci\models\User_model Class Reference
Inheritance diagram for qvci\models\User_model:

Public Member Functions

 add_to_role ($role_id)
 
 checkpass ($password)
 
 full_name_obj ($lastname_first=false)
 
 get_auto_login_string ()
 
 get_permissions ()
 
 get_roles ()
 
 has_permission ($perms=null, $checkvalid=true)
 
 has_role ($role_ids)
 
 is_logged_in ()
 
 is_master_user ()
 
 is_valid ()
 
 remove_from_role ($role_id)
 
 set_last_access ()
 
 uid ()
 

Static Public Member Functions

static table ()
 
static ustatus_options ()
 
static get_active_users ()
 
static get_user_for_auto_login ($auto_login_string)
 
static get_user_for_login ($name, $md5pass)
 
static user_exists ($name)
 
static full_name_static ($uid, $lastname_first=false)
 

Public Attributes

const USTATUS_ACTIVE = 'A'
 
const USTATUS_CONFIRMED = 'C'
 
const USTATUS_DISABLED = 'D'
 
const USTATUS_NEW = '-'
 
const USTATUS_PENDING = 'P'
 
const USTATUS_READONLY = 'R'
 

Detailed Description

Implements the User_model.

Member Function Documentation

qvci\models\User_model::add_to_role (   $role_id)

Add a user to a role

Parameters
int$role_id
qvci\models\User_model::checkpass (   $password)

Check if the given password matches that of the user.

Parameters
string$password
qvci\models\User_model::full_name_obj (   $lastname_first = false)

full_name() - object version Return the full name of a user.

Parameters
bool$lastname_first
static qvci\models\User_model::full_name_static (   $uid,
  $lastname_first = false 
)
static

full_name() - static version Return the full name of a user.

Parameters
bool$lastname_first
static qvci\models\User_model::get_active_users ( )
static

Get a list of active users.

Returns
User_model[]
qvci\models\User_model::get_auto_login_string ( )

Return a string that can be stored in a cookie for auto-login.

qvci\models\User_model::get_permissions ( )

Get a list of permissions for this user, including both individual permissions and those associated with a role.

qvci\models\User_model::get_roles ( )

Get a list of role_ids for this user.

static qvci\models\User_model::get_user_for_auto_login (   $auto_login_string)
static

Given an auto-login string, return a user.

Parameters
string$auto_login_string
Returns
null|User_model
static qvci\models\User_model::get_user_for_login (   $name,
  $md5pass 
)
static

Standard login function. Will accept login with either the email adderss or username, in that order.

Parameters
string$name
string$md5pass
Returns
User_model
qvci\models\User_model::has_permission (   $perms = null,
  $checkvalid = true 
)

Determine if a user has the given permission(s)

Parameters
string|string[]$perms
bool$checkvalidcheck if perms are valid
qvci\models\User_model::has_role (   $role_ids)

Determine if this user has the given role(s).

Parameters
int | array$role_ids
qvci\models\User_model::is_logged_in ( )

Determine if this user is logged in to this session. Does not test to see if a user is logged in somewhere else.

qvci\models\User_model::is_master_user ( )

Return true if this is the master user or is in a master role

Returns
boolean
qvci\models\User_model::is_valid ( )

Determine if a user is valid.

qvci\models\User_model::remove_from_role (   $role_id)

Remove a user from a role

Parameters
int$role_id
qvci\models\User_model::set_last_access ( )

Set the last-access time. This function is called during the init phase of the Authuser library.

qvci\models\User_model::uid ( )

Handy function to get uid

static qvci\models\User_model::user_exists (   $name)
static

Standard authentication function to test if a user exists.

Parameters
string$name

The documentation for this class was generated from the following file: