addProfile (line
2323)
stores profile data to the database calls addProfileObj() for each value array
old methods
int
addProfile
(int $clpId, array $valArr, [boolean $multiArr = False], [boolean $dataCheck = True], [boolean $debug = False])
-
int
$clpId
-
array
$valArr
-
boolean
$multiArr: if the profile allows multiple entries is $valArr a single entry or an array of entries?
-
boolean
$dataCheck: check the data by calling
-
boolean
$debug
addProfileObj (line
2368)
stores profile data to the database processes only one data row
old methods
boolean
addProfileObj
(CLP_PROFILE $profile, array $valArr, [boolean $dataCheck = True], [boolean $debug = False])
-
CLP_PROFILE
$profile
-
array
$valArr
-
boolean
$dataCheck: check the data by calling
-
boolean
$debug
addToGroup (line
1237)
adds the user to $aGrpId
boolean
addToGroup
(int $aGrpId, [ $ro = False], [ $asAdmin = False], [boolean $debug = False])
-
int
$aGrpId
-
boolean
$debug
-
$ro
-
$asAdmin
canEditClient (line
2030)
returns if the user has the right to edit a client
old methods
boolean
canEditClient
(int $cliId, [boolean $debug = False])
-
int
$cliId
-
boolean
$debug
canEditUser (line
1897)
returns if this user has the right to edit another user with id $usrId
old methods
boolean
canEditUser
(mixed $user, [boolean $debug = False])
-
mixed
$user: (integer or OCSP_USER)
-
boolean
$debug
canListClientType (line
2227)
checks if the user can show users of a type returns always True to the type the users client is
old methods if the type exists the columns
checks if the user is in the show or admin group of the clienttype
boolean
canListClientType
(int $ctyId, [boolean $debug = False])
-
int
$ctyId
-
boolean
$debug
canShowClient (line
2014)
returns if the user has the right to view a client's data
old methods
boolean
canShowClient
(int $cliId, [boolean $debug = False])
-
int
$cliId
-
boolean
$debug
canShowUser (line
1867)
returns if this user can see an other user (is in the same group)
old methods
boolean
canShowUser
(int $usrId, [boolean $debug = False])
-
int
$usrId
-
boolean
$debug
checkGroup (line
1795)
old methods
void
checkGroup
( $aGroup, [ $withWrite = False], [ $isAdmin = False])
-
$aGroup
-
$withWrite
-
$isAdmin
checkPassword (line
1281)
checks username and password and setts $this->user if ok
boolean
checkPassword
(DBOBJ $dbObj, string $aName, string $aPasswd, [boolean $debug = False])
-
DBOBJ
$dbObj
-
string
$aName
-
string
$aPasswd
-
boolean
$debug
checkRights (line
1807)
old methods
void
checkRights
( $rights)
checkSEC_REQ (line
1834)
checks security requirements
old methods
bool
checkSEC_REQ
(array $SEC_REQ, [bool $debug = False])
-
array
$SEC_REQ
-
bool
$debug
check_myCliIDTS (line
1935)
returns if myCliIDTS is ok (means not outdated)
old methods
boolean
check_myCliIDTS
()
clearProfileObj (line
2397)
deletes all profile entries for the user
old methods
void
clearProfileObj
( &$profile, [boolean $debug = False], CLP_PROFILE $profile)
-
CLP_PROFILE
$profile
-
boolean
$debug
-
&$profile
dbInsert (line
860)
inserts a new row to the table
int
dbInsert
([boolean $debug = False])
-
boolean
$debug: show debug info
dbSave (line
840)
only saves none public user
boolean
dbSave
([boolean $debug = False])
deleteUser (line
1525)
deletes a user
old methods
boolean
deleteUser
([boolean $debug = False])
getAdminGroups (line
1569)
returns an array of GRP_ID's where the user is admin
old methods
array
getAdminGroups
([boolean $strict = False], [ $keysOnly = True], [boolean $debug = False], boolean $idsOnly)
-
boolean
$strict: only direct assigned groups
-
boolean
$idsOnly: return an array with group ids only
-
boolean
$debug
-
$keysOnly
getClient (line
2121)
returns a client object for the first client found for the user
old methods
CLIENT
&getClient
([
bool $debug =
False])
getCliId (line
2058)
returns the client id from T_CLI_USER
old methods
int
getCliId
([boolean $debug = False], [boolean $forceReload = False])
-
boolean
$debug
-
boolean
$forceReload
getCliTypeId (line
2183)
returns the client type id of the users client or False if no client could be found
old methods
void
getCliTypeId
([boolean $debug = False], [ $forceReload = False], boolean $foreachReload)
-
boolean
$debug
-
boolean
$foreachReload: or use cache (session) if available
-
$forceReload
getDefaultGroupId (line
1049)
returns the default group of the user (GRP_ID in T_SYS_USER)
int
getDefaultGroupId
()
getDirectAssignedAdminGroups (line
1170)
returns an array with group id's direct assigned to the user where he is admin
array
getDirectAssignedAdminGroups
([boolean $forceReload = False], [boolean $debug = False])
-
boolean
$forceReload: (reload the groups from the db)
-
boolean
$debug
getDirectAssignedGroups (line
1064)
returns an array with group id's direct assigned to the user
array
getDirectAssignedGroups
([boolean $forceReload = False], [boolean $debug = False])
-
boolean
$forceReload: (reload the groups from the db)
-
boolean
$debug
getGroups (line
1128)
returns a string containing group id's
string
getGroups
([char $sep = ","], [boolean $forceReload = False], [boolean $debug = False])
-
char
$sep
-
boolean
$forceReload
-
boolean
$debug
getmyClientIds (line
1949)
returns an array of client id's the user is assigned to
old methods
array
getmyClientIds
([int $ctyId = 0], [boolean $forceReload = False], [boolean $debug = False])
-
int
$ctyId
-
boolean
$forceReload
-
boolean
$debug
getMyDBObj (line
717)
loading the db object checks dbtype in the following order
1st: $OCSP_CONF['DBTYPE'] 2nd: $_SERVER['DBTYPE'] 3rd: $GLOBALS['OCSP']['DBTYPE'] 4th: set to mySQL
and sets $OCSP_CONF['DBTYPE'] if not isset or is empty
OCSP_DB
&getMyDBObj
([
boolean $withoutConnect =
False], [
string $dbConffile =
""], [
boolean $useGlobal =
True], [
boolean $debug =
False])
-
boolean
$withoutConnect: (only return the database object)
-
string
$dbConffile
-
boolean
$useGlobal
-
boolean
$debug
getStaff (line
2152)
returns the staff assigned to the user
old methods
CLI_STAFF
getStaff
([
boolean $debug =
False])
returns if a user is admin
boolean
isAdmin
([ $debug = False])
isAllowed (line
1419)
checks the user against a merge of $this->curSecReq and $addSecReq
boolean
isAllowed
([array $addSecReq = NULL], [ $debug = False])
isClientAdmin (line
2257)
checks if the user has admin rights for a client User is group member of CLIENT_ADMIN or T_CLI_USER CLU_ISADMIN is True
old methods uses the array ($this->isCliAdminBuffer to buffer results)
boolen
isClientAdmin
([int $cliId = 0], [boolean $debug = False])
-
int
$cliId: if 0 $this->getCliId() is called
-
boolean
$debug
isClientStaff (line
2290)
checks if the user is staff of a client
old methods
uses the array ($this->isCliAdminBuffer to buffer results)
boolen
isClientStaff
([int $cliId = 0], [boolean $debug = False])
-
int
$cliId: if 0 $this->getCliId() is called
-
boolean
$debug
isEnabled (line
1386)
returns if the user is enabled by default
NOTE: does not check current page settings
boolean
isEnabled
([$debug $debug = False])
isGroupAdmin (line
1214)
returns if the user is group admin
boolean
isGroupAdmin
(int $aGrpId, [boolean $debug = False])
-
int
$aGrpId
-
boolean
$debug
isGroupMember (line
1097)
returns if the user is a member of $aGroup
boolean
isGroupMember
(int $aGrpId, [boolean $debug = False])
-
int
$aGrpId
-
boolean
$debug
isPublic (line
1349)
returns if the user is public or is a logined user
as this function is called durring the dbConnection cal you MUST not use $this->getDBField() method here this will lead to an endless loop.
a user is public if no login name is set
boolean
isPublic
([boolean $debug = False])
boolean
isValid
([ $debug = False])
opens a connection to the database and checks username and password
old methods if username and password don't match the connection is closed else the connection is assigned to $GLOBALS['OCSP_OBJ'][$this->gDBIDX]
sets:
boolean
login
( $aName, $aPasswd, [ $aConffile = NULL], [ $asAdmin = False], [ $debug = False])
-
$aName
-
$aPasswd
-
$aConffile
-
$asAdmin
-
$debug
loginScreen (line
1782)
shows the login screen and returns to the current page
old methods
void
loginScreen
([int $method = OCSP_AUTH_HTTP], [string $form = ""])
-
int
$method: (OCSP_AUTH_xxxx)
-
string
$form
logsout the current user
old methods
void
logout
([ $debug = False])
populateMyGroups (line
1016)
populates the groups from the database (T_SYS_GROUPMEMBER)
void
populateMyGroups
(boolean $debug)
populateUser (line
1847)
not final use override this method to populate the additionl user data
old methods
bool
populateUser
([bool $debug = False])
removeFromGroup (line
1256)
remove the user from $aGrpId
boolean
removeFromGroup
(int $aGrpId, [boolean $debug = False])
-
int
$aGrpId
-
boolean
$debug
sessPopulate (line
895)
populates a user from the session
void
sessPopulate
([boolean $debug = False])
sessSave (line
968)
stores the user to the session
void
sessSave
([boolean $debug = False])
sessTouch (line
998)
sets session user timestamp
void
sessTouch
([boolean $debug = False])
setCliId (line
2090)
sets the client id and generates a row in T_CLI_USER
old methods
void
setCliId
(int $cliId, [boolean $overwrite = True], [boolean $debug = False])
-
int
$cliId
-
boolean
$overwrite: remove all rows for the user in T_CLI_USER
-
boolean
$debug
setDBRow (line
818)
sets a database row to the object fields
sets each key (=columname) value
if $row['__OCSP_OBJ_VALS__'] isset and an array this values are set as object values else if $asPopulated object values are loaded
bool
setDBRow
(array $row, [boolean $asPopulated = True], [boolean $debug = False])
-
array
$row: the row form a select * from DBMS_TABLEOBJ::myTable
-
boolean
$asPopulated: set populateTS as if the object has been populated
-
boolean
$debug
setMyDBObj (line
684)
void
setMyDBObj
(
&$aDBObj,
OCSP_DB $aDBObj)
setPassword (line
878)
changes the password
void
setPassword
(string $newPassword)
setSecRequireArr (line
1401)
merges $secReq with $this->curSecReq
void
setSecRequireArr
(array $secReq)
touch (line
783)
touches the user
void
touch
([boolean $toDB = False], [boolean $debug = False])
-
boolean
$toDB
-
boolean
$debug