Public Member Functions | |
setLoginName ($login) | |
getSubstitute () | |
getIncumbents ($returnSystemIds=true) | |
setSubstitute ($substitute) | |
setLogin ($login, $unused= '0') | |
setFid ($fid) | |
preInsert () | |
PostInsert () | |
postUpdate () | |
preUpdate () | |
postDelete () | |
CheckLogin ($login, $unused, $whatid) | |
getAccountName () | |
setUsers ($fid, $lname, $fname, $expires, $passdelay, $login, $status, $pwd1, $pwd2, $unused= '', $extmail= '') | |
updateUser ($fid, $lname, $fname, $expires, $passdelay, $login, $status, $pwd1, $pwd2, $extmail= '', array $roles=array(-1), $substitute=-1) | |
setGroups ($fid, $gname, $login, array $roles=array(-1)) | |
revert () | |
getExpires () | |
computepass ($pass, &$passk) | |
checkpassword ($pass) | |
checkpass ($pass, $passk) | |
getMail ($rawmail=true) | |
PostInit () | |
getIncumbentPrivilege (Doc &$doc, $acl) | |
getGroupsId () | |
getRUsersList ($id, $r=array()) | |
getUsersGroupList ($gid, $onlygroup=false) | |
getUserParents ($accountFilter= '') | |
getStrictMemberOf ($uid=-1) | |
updateMemberOf ($updateSubstitute=true) | |
getMemberOf ($useSystemId=true) | |
isMember ($uid) | |
getGroupUserList ($qtype="LIST", $withgroup=false, $limit="all") | |
getAllMembers ($limit="all", $onlyUsers=true) | |
getUserToken ($expireDelay=-1, $oneshot=false, $context=array(), $description="", $forceCreate=false) | |
setAdminHtpasswd ($admin_passwd) | |
setSupervisorHtpasswd ($admin_passwd) | |
addRole ($idRole) | |
setRoles (array $roleIds) | |
getRoles ($useSystemId=true) | |
getAllRoles () | |
deleteRoles () | |
Public Member Functions inherited from DbObj | |
__construct ($dbaccess= '', $id= '', $res= '', $dbid=0) | |
Select ($id) | |
getValues () | |
affectColumn ($fields, $reset=true) | |
affect ($array, $more=false, $reset=true) | |
isAffected () | |
Complete () | |
preInsert () | |
postInsert () | |
preUpdate () | |
postUpdate () | |
preDelete () | |
postDelete () | |
preSelect ($id) | |
postSelect ($id) | |
Add ($nopost=false, $nopre=false) | |
modify ($nopost=false, $sfields="", $nopre=false) | |
delete ($nopost=false) | |
Adds (&$tcopy, $nopost=false) | |
lw ($prop) | |
CloseConnect () | |
Create ($nopost=false) | |
postInit () | |
init_dbid () | |
exec_query ($sql, $lvl=0, $prepare=false) | |
numrows () | |
fetch_array ($c, $type=PGSQL_ASSOC) | |
update () | |
setError ($moreerr= '') | |
autoUpdate () | |
savePoint ($point) | |
lockPoint ($exclusiveLock, $exclusiveLockPrefix= '') | |
setMasterLock ($useLock) | |
rollbackPoint ($point) | |
commitPoint ($point) | |
Static Public Member Functions | |
static | getDisplayName ($uid) |
static | getUidFromFid ($fid) |
static | getFidFromUid ($uid) |
static | getUserList ($qtype="LIST", $start=0, $slice=0, $filteruser= '') |
static | getGroupList ($qtype="LIST") |
static | getRoleList ($qtype="LIST") |
static | getUserAndGroupList ($qtype="LIST") |
static | getUserMemberOf ($uid, $strict=false) |
Data Fields | |
const | ANONYMOUS_ID = ANONYMOUS_ID |
const | GALL_ID = GALL_ID |
const | GADMIN_ID = GADMIN_ID |
const | ADMIN_ID = 1 |
const | USER_TYPE = "U" |
const | GROUP_TYPE = "G" |
const | ROLE_TYPE = "R" |
$fields | |
$id | |
$lastname | |
$firstname | |
$login | |
$password | |
$isgroup | |
$expires | |
$passdelay | |
$status | |
$fid | |
$memberof | |
$accounttype | |
$substitute | |
$famid | |
$password_new | |
$id_fields | |
$dbtable = "users" | |
$order_by = "lastname, accounttype" | |
$fulltextfields | |
$sqlcreate | |
Data Fields inherited from DbObj | |
$dbid = - 1 | |
$dbaccess = '' | |
$fields | |
$dbtable = '' | |
$id_fields | |
$criterias = array() | |
$sup_fields = array() | |
$sup_where = array() | |
$sup_tables = array() | |
$fulltextfields = array() | |
$order_by = "" | |
$isset = false | |
$msg_err = '' | |
$err_code = '' | |
$res = '' | |
$debug = false | |
$sqlcreate | |
$sqlinit | |
$log | |
Additional Inherited Members | |
Static Public Attributes inherited from DbObj | |
static | $savepoint = array() |
static | $lockpoint = array() |
static | $sqlStrict = null |
Protected Member Functions inherited from DbObj | |
tryCreate () | |
Manage User, Group and Role account object
Definition at line 31 of file Class.Account.php.
addRole | ( | $idRole | ) |
add a role to a user/group
string | $idRole | system identicator or reference role (login) |
Definition at line 1187 of file Class.Account.php.
CheckLogin | ( | $login, | |
$unused, | |||
$whatid | |||
) |
string | $login | |
string | $unused | |
int | $whatid |
Definition at line 353 of file Class.Account.php.
checkpass | ( | $pass, | |
$passk | |||
) |
checkpassword | ( | $pass | ) |
string | $pass | clear password to test |
Definition at line 614 of file Class.Account.php.
computepass | ( | $pass, | |
& | $passk | ||
) |
Definition at line 601 of file Class.Account.php.
deleteRoles | ( | ) |
delete all role of a user/group
Definition at line 1281 of file Class.Account.php.
getAccountName | ( | ) |
Same as ::getDisplayName but for current object
Definition at line 395 of file Class.Account.php.
getAllMembers | ( | $limit = "all" , |
|
$onlyUsers = true |
|||
) |
get all users of a group/role direct or indirect
int | string | $limit | max users returned |
bool | $onlyUsers | set to true to have also sub groups |
Definition at line 1052 of file Class.Account.php.
getAllRoles | ( | ) |
return direct and indirect role which comes from groups
bool | $useSystemId | if true return system id else return document ids |
Definition at line 1269 of file Class.Account.php.
|
static |
return display name of a user
int | $uid | user identifier |
Definition at line 373 of file Class.Account.php.
getExpires | ( | ) |
Definition at line 537 of file Class.Account.php.
|
static |
return user document reference from system user identifier
int | $fid |
Definition at line 421 of file Class.Account.php.
|
static |
get All groups
string | $qtype | return type LIST|TABLE|ITEM |
Definition at line 779 of file Class.Account.php.
getGroupsId | ( | ) |
get All ascendant group ids of the user object
Definition at line 816 of file Class.Account.php.
getGroupUserList | ( | $qtype = "LIST" , |
|
$withgroup = false , |
|||
$limit = "all" |
|||
) |
only use with group or role if it is a group : get all direct user member of a group if it is a role : het user which has role directly
string | $qtype | LIST|TABLE|ITEM |
bool | $withgroup | set to true to return sub group also |
int | string | $limit | max users returned |
Definition at line 1038 of file Class.Account.php.
getIncumbentPrivilege | ( | Doc & | $doc, |
$acl | |||
) |
get the first incumbent which has $acl privilege
Doc | $doc | document to verify |
string | $acl | document acl name |
Definition at line 744 of file Class.Account.php.
getIncumbents | ( | $returnSystemIds = true | ) |
return incumbent ids account list (accounts which has this account as substitute)
bool | $returnSystemIds | set to true to return system account id, false to return document user id |
Definition at line 163 of file Class.Account.php.
getMail | ( | $rawmail = true | ) |
return mail adress
bool | $rawmail | set to false to have long mail with firstname and lastname |
Definition at line 649 of file Class.Account.php.
getMemberOf | ( | $useSystemId = true | ) |
return id of group/role id
bool | $useSystemId | set to false to return document id instead of system id |
Definition at line 970 of file Class.Account.php.
|
static |
get All Roles
string | $qtype | return type LIST|TABLE|ITEM |
Definition at line 792 of file Class.Account.php.
getRoles | ( | $useSystemId = true | ) |
return direct role ids (not role which can comes from parent groups)
bool | $useSystemId | if true return system id else return document ids |
Definition at line 1257 of file Class.Account.php.
getRUsersList | ( | $id, | |
$r = array() |
|||
) |
for group :: get All user & groups ids in all descendant(recursive);
int | $id | group identifier |
Definition at line 828 of file Class.Account.php.
getStrictMemberOf | ( | $uid = - 1 | ) |
get memberof for user without substitutes
int | $uid | if not set it is the current account object else use another account identifier |
Dcp\Exception |
Definition at line 918 of file Class.Account.php.
getSubstitute | ( | ) |
return substitute account return null if no susbtitute
Definition at line 149 of file Class.Account.php.
|
static |
return system user identifier from user document reference
int | $fid |
Definition at line 406 of file Class.Account.php.
|
static |
get All users & groups (except role)
string | $qtype | return type LIST|TABLE|ITEM |
Definition at line 805 of file Class.Account.php.
|
static |
get All Users (not group not role)
string | $qtype | return type LIST|TABLE|ITEM |
int | $start | |
int | $slice | |
string | $filteruser | keyword to filter user on login or lastname |
Definition at line 766 of file Class.Account.php.
|
static |
return list of account (group/role) member for a user return null if user not exists
int | $uid | user identifier |
Definition at line 991 of file Class.Account.php.
getUserParents | ( | $accountFilter = '' | ) |
return all group (recursive) /role of user
string | $accountFilter | G|R to indicate if want only group or only role |
Definition at line 898 of file Class.Account.php.
getUsersGroupList | ( | $gid, | |
$onlygroup = false |
|||
) |
for group :: get All direct user & groups ids
int | $id | group identifier |
bool | $onlygroup | set to true if you want only child groups |
Definition at line 854 of file Class.Account.php.
getUserToken | ( | $expireDelay = - 1 , |
|
$oneshot = false , |
|||
$context = array() , |
|||
$description = "" , |
|||
$forceCreate = false |
|||
) |
Get user token for open access
bool | int | $expireDelay | set expiration delay in seconds (-1 if nether expire) |
bool | $oneshot | set to true to use one token is consumed/deleted when used |
array | $context | get http var restriction |
string | $description | text description information |
bool | $forceCreate | set to true to always return a new token |
\Dcp\Exception |
Definition at line 1076 of file Class.Account.php.
isMember | ( | $uid | ) |
verify if user is member of group (recursive)
Definition at line 1013 of file Class.Account.php.
postDelete | ( | ) |
PostInit | ( | ) |
Definition at line 684 of file Class.Account.php.
PostInsert | ( | ) |
Definition at line 295 of file Class.Account.php.
postUpdate | ( | ) |
Definition at line 308 of file Class.Account.php.
preInsert | ( | ) |
preUpdate | ( | ) |
revert | ( | ) |
revert values from database
Definition at line 529 of file Class.Account.php.
setAdminHtpasswd | ( | $admin_passwd | ) |
Set password for the admin account in the `admin' subdir
string | $admin_passwd | the password |
Definition at line 1136 of file Class.Account.php.
setFid | ( | $fid | ) |
affect account from its document id
int | $fid |
Definition at line 236 of file Class.Account.php.
setGroups | ( | $fid, | |
$gname, | |||
$login, | |||
array | $roles = array(-1 ) |
||
) |
update user from FREEDOM IGROUP document
int | $fid | document id |
string | $gname | group name |
string | $login | login |
array | $roles | system role ids |
Definition at line 504 of file Class.Account.php.
setLogin | ( | $login, | |
$unused = '0' |
|||
) |
affect account from its login
string | $login | login |
Definition at line 226 of file Class.Account.php.
setLoginName | ( | $login | ) |
affect account from login name
string | $login | login |
Definition at line 130 of file Class.Account.php.
setRoles | ( | array | $roleIds | ) |
set role set to a user/group
array | $roleIds | system identicators or reference roles (login) |
Definition at line 1213 of file Class.Account.php.
setSubstitute | ( | $substitute | ) |
set substitute to this user this user become the incumbent of $substitute
string | $substitute | login or user system id |
Definition at line 178 of file Class.Account.php.
setSupervisorHtpasswd | ( | $admin_passwd | ) |
Set password for the admin account in the `admin' subdir
string | $admin_passwd | the password |
Definition at line 1146 of file Class.Account.php.
setUsers | ( | $fid, | |
$lname, | |||
$fname, | |||
$expires, | |||
$passdelay, | |||
$login, | |||
$status, | |||
$pwd1, | |||
$pwd2, | |||
$unused = '' , |
|||
$extmail = '' |
|||
) |
update user from IUSER document
int | $fid | document id |
string | $login | login |
Definition at line 435 of file Class.Account.php.
updateMemberOf | ( | $updateSubstitute = true | ) |
update memberof fields with all group/role of user
bool | $updateSubstitute | also update substitute by default |
Dcp\Exception |
Definition at line 938 of file Class.Account.php.
updateUser | ( | $fid, | |
$lname, | |||
$fname, | |||
$expires, | |||
$passdelay, | |||
$login, | |||
$status, | |||
$pwd1, | |||
$pwd2, | |||
$extmail = '' , |
|||
array | $roles = array(-1 ) , |
||
$substitute = - 1 |
|||
) |
update user from IUSER document
int | $fid | document id |
string | $lname | last name |
string | $fname | first name |
string | $expires | expiration date |
int | $passdelay | password delay |
string | $login | login |
string | $status | 'A' (Activate) , 'D' (Desactivated) |
string | $pwd1 | password one |
string | $pwd2 | password two |
string | $extmail | mail address |
array | $roles | |
int | $substitute | system substitute id |
Definition at line 455 of file Class.Account.php.
$accounttype |
Definition at line 78 of file Class.Account.php.
$dbtable = "users" |
Definition at line 96 of file Class.Account.php.
Definition at line 69 of file Class.Account.php.
$famid |
Definition at line 87 of file Class.Account.php.
$fid |
Definition at line 73 of file Class.Account.php.
$fields |
Definition at line 42 of file Class.Account.php.
$firstname |
Definition at line 61 of file Class.Account.php.
$fulltextfields |
Definition at line 100 of file Class.Account.php.
$id |
Definition at line 59 of file Class.Account.php.
$id_fields |
Definition at line 92 of file Class.Account.php.
$isgroup |
Definition at line 68 of file Class.Account.php.
$lastname |
Definition at line 60 of file Class.Account.php.
$login |
Definition at line 62 of file Class.Account.php.
Definition at line 72 of file Class.Account.php.
$memberof |
Definition at line 74 of file Class.Account.php.
$order_by = "lastname, accounttype" |
Definition at line 98 of file Class.Account.php.
$passdelay |
Definition at line 70 of file Class.Account.php.
$password |
Definition at line 63 of file Class.Account.php.
Definition at line 91 of file Class.Account.php.
$sqlcreate |
Definition at line 106 of file Class.Account.php.
$status |
Definition at line 71 of file Class.Account.php.
$substitute |
Definition at line 82 of file Class.Account.php.
const ADMIN_ID = 1 |
Definition at line 36 of file Class.Account.php.
const ANONYMOUS_ID = ANONYMOUS_ID |
Definition at line 33 of file Class.Account.php.
const GADMIN_ID = GADMIN_ID |
Definition at line 35 of file Class.Account.php.
const GALL_ID = GALL_ID |
Definition at line 34 of file Class.Account.php.
const GROUP_TYPE = "G" |
Definition at line 39 of file Class.Account.php.
const ROLE_TYPE = "R" |
Definition at line 40 of file Class.Account.php.
const USER_TYPE = "U" |
Definition at line 38 of file Class.Account.php.