fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

User Class Reference
Inheritance diagram for User:
[legend]
Collaboration diagram for User:
[legend]

Public Member Functions

 passwordValidate ( $username, $password, $adminTest=false)
 
 validatePw ( $username, $password)
 
 set ( $key, $value, $override=false)
 
 isValid ()
 
 logout ()
 
- Public Member Functions inherited from FOGController
 __construct ($data='')
 
 __destruct ()
 
 __toString ()
 
 get ($key='')
 
 set ($key, $value)
 
 add ($key, $value)
 
 remove ($key, $value)
 
 save ()
 
 load ($key='id')
 
 getcolumns (&$fields)
 
 destroy ($key='id')
 
 key (&$key)
 
 buildQuery (&$join, &$whereArrayAnd, &$c, $not=false, $compare='=')
 
 setQuery (&$queryData)
 
 getManager ()
 
 assocSetter ($assocItem, $alterItem='', $implicitCall=false)
 
- Public Member Functions inherited from FOGBase
 __construct ()
 
 orderBy (&$orderBy)
 

Static Public Member Functions

static generateHash ( $password, $cost=11)
 
- Static Public Member Functions inherited from FOGBase
static getClass ($class, $data='', $props=false)
 
static getHostItem ( $service=true, $encoded=false, $hostnotrequired=false, $returnmacs=false, $override=false, $mac=false)
 
static getAllBlamedNodes ($Host)
 
static niceDate ($date='now', $utc=false)
 
static formatTime ($time, $format=false, $utc=false)
 
static createSecToken ()
 
static aesencrypt ( $data, $key=false, $enctype='aes-256-cbc')
 
static aesdecrypt ( $encdata, $key=false, $enctype='aes-128-cbc')
 
static parseMacList ( $stringlist, $image=false, $client=false)
 
static getSubObjectIDs ( $object='Host', $findWhere=array(), $getField='id', $not=false, $operator='AND', $orderBy='name', $groupBy=false, $filter='array_unique')
 
static getSetting ($key)
 
static setSetting ($key, $value)
 
static getQueuedStates ()
 
static getQueuedState ()
 
static getCheckedInState ()
 
static getProgressState ()
 
static getCompleteState ()
 
static getCancelledState ()
 
static stringBetween ($string, $start, $end)
 
static stripAndDecode (&$item)
 
static getMasterInterface ($ip_find)
 
static lasterror ()
 
static getFilesize ($path)
 
static wakeUp ($macs)
 
static fastmerge ($array1)
 
static getHash ($file)
 
static attemptLogin ($username, $password)
 
static clearMACLookupTable ()
 
static getMACLookupCount ()
 
static resolveHostname ($host)
 
static getBroadcast ()
 
static randWait ()
 

Protected Attributes

 $databaseTable = 'users'
 
 $databaseFields
 
 $databaseFieldsRequired
 
 $additionalFields
 
- Protected Attributes inherited from FOGController
 $data = array()
 
 $autoSave = false
 
 $databaseTable = ''
 
 $databaseFields = array()
 
 $databaseFieldsRequired = array()
 
 $additionalFields = array()
 
 $databaseFieldsFlipped = array()
 
 $databaseFieldsToIgnore
 
 $aliasedFields = array()
 
 $databaseFieldClassRelationships = array()
 
 $loadQueryTemplate = 'SELECT %s FROM `%s` %s WHERE `%s`=%s %s'
 
 $insertQueryTemplate = 'INSERT INTO `%s` (%s) VALUES (%s) %s %s'
 
 $destroyQueryTemplate = 'DELETE FROM `%s` WHERE %s=%s%s'
 
- Protected Attributes inherited from FOGBase
 $isLoaded = array()
 

Private Member Functions

 _isLoggedIn ()
 

Private Attributes

 $_inactivitySessionTimeout
 
 $_regenerateSessionTimeout
 
 $_alwaysloggedin
 
 $_checkedalready
 
 $_sessionID
 

Additional Inherited Members

- Static Public Attributes inherited from FOGBase
static $locale = ''
 
static $fogpingactive = false
 
static $fogdeleteactive = false
 
static $fogexportactive = false
 
static $pendingMACs = 0
 
static $pendingHosts = 0
 
static $defaultscreen = ''
 
static $pluginsinstalled = array()
 
static $useragent
 
static $foglang
 
static $ajax = false
 
static $post = false
 
static $service = false
 
static $json = false
 
static $newService = false
 
static $scriptname
 
static $querystring
 
static $httpreqwith
 
static $reqmethod
 
static $remoteaddr
 
static $httpreferer
 
static $mySchema = 0
 
static $showhtml = true
 
static $httpproto = false
 
static $httphost = ''
 
static $Host = null
 
- Protected Member Functions inherited from FOGController
 loadItem ($key)
 
 addRemItem ($key, $array, $array_type)
 
- Protected Member Functions inherited from FOGBase
 isLoaded ($key)
 
 setRequest ()
 
 sendData ( $datatosend, $service=true, $array=array())
 
- Static Protected Member Functions inherited from FOGBase
static getActivePlugins ()
 
static fatalError ($txt, $data=array())
 
static error ($txt, $data=array())
 
static debug ($txt, $data=array())
 
static info ($txt, $data=array())
 
static setMessage ($txt, $data=array())
 
static getMessages ()
 
static redirect ($url='')
 
static arrayInsertBefore ( $key, array &$array, $new_key, $new_value)
 
static arrayInsertAfter ( $key, array &$array, $new_key, $new_value)
 
static arrayRemove ($key, array &$array)
 
static arrayFind ( $needle, array $haystack, $ignorecase=false)
 
static resetRequest ()
 
static formatByteSize ($size)
 
static getGlobalModuleStatus ($names=false, $keys=false)
 
static validDate ($date, $format='')
 
static pluralize ($count, $text, $space=false)
 
static diff ($start, $end, $ago=false)
 
static humanify ($diff, $unit)
 
static arrayChangeKey (array &$array, $old_key, $new_key)
 
static byteconvert ($kilobytes)
 
static hex2bin ($hex)
 
static certEncrypt ($data)
 
static certDecrypt ($dataArr, $padding=true)
 
static arrayStrpos ($haystack, $needles, $case=true)
 
static log ( $txt, $curlog, $logfile, $logbrow, $obj, $level=1)
 
static logHistory ($string)
 
static getIPAddress ($force=false)
 
- Static Protected Attributes inherited from FOGBase
static $strlen
 
static $debug = false
 
static $info = false
 
static $buildSelectBox
 
static $selected
 
static $DB
 
static $FOGFTP
 
static $FOGCore
 
static $EventManager
 
static $HookManager
 
static $TimeZone
 
static $FOGUser
 
static $FOGPageManager
 
static $FOGURLRequests
 
static $FOGSubMenu
 
static $ips = array()
 
static $interface = array()
 
static $searchPages
 

Detailed Description

Definition at line 22 of file user.class.php.

Member Function Documentation

◆ _isLoggedIn()

User::_isLoggedIn ( )
private

Tests if user is logged in

Returns
bool

Definition at line 379 of file user.class.php.

References $foglang, FOGBase\getSubObjectIDs(), isValid(), FOGBase\redirect(), and FOGBase\setMessage().

Referenced by validatePw().

◆ generateHash()

static User::generateHash (   $password,
  $cost = 11 
)
static

Generates an encrypted hash

Parameters
string$passwordthe password
int$costcost of hash
Returns
string

Definition at line 105 of file user.class.php.

References $password.

Referenced by set().

◆ isValid()

User::isValid ( )

Tests if an object is valid

Returns
bool

Reimplemented from FOGController.

Definition at line 364 of file user.class.php.

Referenced by _isLoggedIn(), and validatePw().

◆ logout()

User::logout ( )

Perform logout cleanup

Returns
void

Definition at line 483 of file user.class.php.

References FOGBase\setMessage().

◆ passwordValidate()

User::passwordValidate (   $username,
  $password,
  $adminTest = false 
)

Validates the users password and user

Parameters
string$usernamethe username to test
string$passwordthe password to test
string$adminTestthe admin test
Returns
bool

Test the username for funky characters and return immediately if found.

Definition at line 124 of file user.class.php.

References $password, $test, $username, and FOGBase\getClass().

Referenced by validatePw().

◆ set()

User::set (   $key,
  $value,
  $override = false 
)

Sets the passed value

Parameters
string$keythe key to set
mixed$valuethe value to set
bool$overrideto override the setter
Returns
object

Definition at line 347 of file user.class.php.

References generateHash(), and FOGController\key().

◆ validatePw()

User::validatePw (   $username,
  $password 
)

Validates only the user and password

Parameters
string$usernamethe username
string$passwordthe password
Returns
object

Test the username for funky characters and return immediately if found.

Definition at line 214 of file user.class.php.

References $foglang, $password, $test, $username, _isLoggedIn(), isValid(), FOGBase\log(), passwordValidate(), and FOGBase\setMessage().

Member Data Documentation

◆ $_alwaysloggedin

User::$_alwaysloggedin
private

Definition at line 41 of file user.class.php.

◆ $_checkedalready

User::$_checkedalready
private

Definition at line 47 of file user.class.php.

◆ $_inactivitySessionTimeout

User::$_inactivitySessionTimeout
private

Definition at line 29 of file user.class.php.

◆ $_regenerateSessionTimeout

User::$_regenerateSessionTimeout
private

Definition at line 35 of file user.class.php.

◆ $_sessionID

User::$_sessionID
private

Definition at line 53 of file user.class.php.

◆ $additionalFields

User::$additionalFields
protected
Initial value:
= array(
'authID',
'authIP',
'authTime',
'authLastActivity',
'authUserAgent',
)

Definition at line 90 of file user.class.php.

◆ $databaseFields

User::$databaseFields
protected
Initial value:
= array(
'id' => 'uId',
'name' => 'uName',
'password' => 'uPass',
'createdTime' => 'uCreateDate',
'createdBy' => 'uCreateBy',
'type' => 'uType',
'display' => 'uDisplay',
'api' => 'uAllowAPI',
'token' => 'uAPIToken'
)

Definition at line 65 of file user.class.php.

◆ $databaseFieldsRequired

User::$databaseFieldsRequired
protected
Initial value:
= array(
'name',
'password',
)

Definition at line 81 of file user.class.php.

◆ $databaseTable

User::$databaseTable = 'users'
protected

Definition at line 59 of file user.class.php.


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