CaMykS  1.0-20231201
Public Member Functions | Public Attributes | Private Member Functions | List of all members
AdminUser Class Reference

Public Member Functions

 __construct ($login='')
 
 get ()
 
 initialise ()
 
 save ()
 
 install ()
 
 is_installed ()
 
 update_2FAData ($data='')
 
 reset_2FAData ($data='')
 
 get_fromHeader ($prefix='')
 
 get_fromArray ($data)
 
 check_data ()
 
 exists_login ($login)
 
 can_login ($pwd)
 
 initialise_rights ()
 
 get_right ($module, $idx)
 
 get_userList ($where='', $objMode=false)
 
 get_activeUserList ($objMode=false)
 
 get_nameDisplay ()
 
 get_usersStatusList ($params=array())
 
 static_getList ()
 
 update_toVersion1_1 ()
 
 update_toVersion1_2 ()
 

Public Attributes

 $login
 
 $pwd
 
 $email
 
 $active
 
 $webmaster
 
 $firstname
 
 $lastname
 
 $address
 
 $rights
 
 $twoFactorData
 
 $rights_
 
 $is_new
 
 $change_pwd
 
 $pwd_conf
 
 $full_update
 
 $_libParent
 
 $_libError = ''
 
 $_libDesc = 'Module: Admin_User Lib: AdminUser'
 

Private Member Functions

 get_fromDatabase ()
 
 create_toDatabase ()
 
 update_toDatabase ()
 
 delete_fromDatabase ()
 
 decode_rights ($module)
 
 encode_rights ($module, $rights)
 
 get_translation ($translation, $params=null)
 

Detailed Description

AdminUser class.

Constructor & Destructor Documentation

◆ __construct()

AdminUser::__construct (   $login = '')

Class constructor.

Parameters
string$login
Returns
void

Member Function Documentation

◆ get()

AdminUser::get ( )

Load adminuser object.

Returns
boolean success

◆ initialise()

AdminUser::initialise ( )

Initialise new empty adminuser object.

Returns
boolean result

◆ save()

AdminUser::save ( )

Save adminuser object.

Returns
boolean result

◆ get_fromDatabase()

AdminUser::get_fromDatabase ( )
private

Load object from database.

Returns
boolean success

◆ create_toDatabase()

AdminUser::create_toDatabase ( )
private

Create new adminser object to database.

Returns
boolean success

◆ update_toDatabase()

AdminUser::update_toDatabase ( )
private

Update adminuser object to database.

Returns
boolean success

◆ delete_fromDatabase()

AdminUser::delete_fromDatabase ( )
private

Delete adminuser object from database.

Returns
boolean success

◆ install()

AdminUser::install ( )

Install adminuser table and first adminuser object in database.

Returns
boolean success

◆ is_installed()

AdminUser::is_installed ( )

Check is object is installed.

Returns
boolean success

◆ update_2FAData()

AdminUser::update_2FAData (   $data = '')

Update 2FA data.

Parameters
string$data,.
Returns
boolean success

◆ reset_2FAData()

AdminUser::reset_2FAData (   $data = '')

Reset 2FA data.

Returns
boolean success

◆ get_fromHeader()

AdminUser::get_fromHeader (   $prefix = '')

Load adminuser object from header.

Parameters
string$prefix

◆ get_fromArray()

AdminUser::get_fromArray (   $data)

Load adminuser object from array.

Returns
void

◆ check_data()

AdminUser::check_data ( )

Parse and check all data.

Returns
boolean success

◆ exists_login()

AdminUser::exists_login (   $login)

Check if $login login already exists.

Parameters
string$login
Returns
boolean result

◆ can_login()

AdminUser::can_login (   $pwd)

Try to log in.

Parameters
string$pwd
Returns
boolean result

◆ initialise_rights()

AdminUser::initialise_rights ( )

Initialise new rights combining modules defaults rights and current admin user ones.

Returns
array

◆ decode_rights()

AdminUser::decode_rights (   $module)
private

Decode rights for given module.

Returns
void

◆ encode_rights()

AdminUser::encode_rights (   $module,
  $rights 
)
private

Encode rights for given module.

Parameters
string$module
array$rights
Returns
void

◆ get_right()

AdminUser::get_right (   $module,
  $idx 
)

Return permission for a module

Parameters
string$module
integer$idx
Returns
boolean result

◆ get_userList()

AdminUser::get_userList (   $where = '',
  $objMode = false 
)

Return the user list corresponding to the where sql statement

Parameters
string$where
boolean$objMode
Returns
array

◆ get_activeUserList()

AdminUser::get_activeUserList (   $objMode = false)

Return active user list.

Parameters
boolean$objMode
Returns
array

◆ get_nameDisplay()

AdminUser::get_nameDisplay ( )

Return user name display

Returns
string

◆ get_usersStatusList()

AdminUser::get_usersStatusList (   $params = array())

Return users status list.

Parameters
array$params
Returns
array

◆ static_getList()

AdminUser::static_getList ( )

Return the user login list.

Returns
array

◆ get_translation()

AdminUser::get_translation (   $translation,
  $params = null 
)
private

Return translation.

Parameters
string$translation
array$params
Returns
string

◆ update_toVersion1_1()

AdminUser::update_toVersion1_1 ( )

Execute version 1.1 update.

Returns
boolean success

◆ update_toVersion1_2()

AdminUser::update_toVersion1_2 ( )

Execute version 1.2 update.

Returns
boolean success

Member Data Documentation

◆ $login

AdminUser::$login

◆ $pwd

AdminUser::$pwd

◆ $email

AdminUser::$email

◆ $active

AdminUser::$active

◆ $webmaster

AdminUser::$webmaster

◆ $firstname

AdminUser::$firstname

◆ $lastname

AdminUser::$lastname

◆ $address

AdminUser::$address

◆ $rights

AdminUser::$rights

◆ $twoFactorData

AdminUser::$twoFactorData

◆ $rights_

AdminUser::$rights_

◆ $is_new

AdminUser::$is_new

◆ $change_pwd

AdminUser::$change_pwd

◆ $pwd_conf

AdminUser::$pwd_conf

◆ $full_update

AdminUser::$full_update

◆ $_libParent

AdminUser::$_libParent

◆ $_libError

AdminUser::$_libError = ''

◆ $_libDesc

AdminUser::$_libDesc = 'Module: Admin_User Lib: AdminUser'

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