Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
getAlwaysActiveStages () | |
getByUserId ($userId, $contextId=null) | |
getByUserIdGroupedByContext ($userId) | |
getForbiddenStages ($roleId=null) | |
getUsersByRoleId ($roleId=null, $contextId=null, $searchType=null, $search=null, $searchMatch=null, $dbResultRange=null) | |
newDataObject () | |
userHasRole ($contextId, $userId, $roleId) | |
Public Member Functions inherited from DAO | |
__construct ($dataSource=null, $callHooks=true) | |
concat () | |
convertFromDB ($value, $type) | |
convertToDB ($value, &$type) | |
dateFromDB ($d) | |
datetimeFromDB ($dt) | |
datetimeToDB ($dt) | |
dateToDB ($d) | |
flushCache () | |
formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
getAdditionalFieldNames () | |
getAffectedRows () | |
getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
getDataSource () | |
getDirectionMapping ($direction) | |
getDriver () | |
getLocaleFieldNames () | |
getType ($value) | |
handleError ($dataSource, $sql) | |
nullOrInt ($value) | |
replace ($table, $arrFields, $keyCols) | |
& | retrieve ($sql, $params=false, $callHooks=true) |
& | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
& | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
& | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
setCacheDir () | |
setDataSource ($dataSource) | |
update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
Data Fields | |
$userDao | |
Data Fields inherited from DAO | |
$_dataSource | |
Additional Inherited Members | |
Static Public Member Functions inherited from DAO | |
static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
Protected Member Functions inherited from DAO | |
_getInsertId ($table='', $id='') | |
Operations for retrieving and modifying Role objects.
Definition at line 19 of file RoleDAO.inc.php.
RoleDAO::__construct | ( | ) |
RoleDAO::getAlwaysActiveStages | ( | ) |
All stages are always active for these permission levels.
Definition at line 224 of file RoleDAO.inc.php.
RoleDAO::getByUserId | ( | $userId, | |
$contextId = null |
|||
) |
Return an array of row objects corresponding to the roles a given use has
$userId | |
$contextId |
Definition at line 144 of file RoleDAO.inc.php.
References newDataObject(), and DAO\retrieve().
RoleDAO::getByUserIdGroupedByContext | ( | $userId | ) |
Return an array of objects corresponding to the roles a given user has, grouped by context id.
$userId | int |
Definition at line 172 of file RoleDAO.inc.php.
References DAORegistry\getDAO().
RoleDAO::getForbiddenStages | ( | $roleId = null | ) |
Get role forbidden stages.
$roleId | int Specific role ID to fetch stages for, if any |
Definition at line 193 of file RoleDAO.inc.php.
RoleDAO::getUsersByRoleId | ( | $roleId = null , |
|
$contextId = null , |
|||
$searchType = null , |
|||
$search = null , |
|||
$searchMatch = null , |
|||
$dbResultRange = null |
|||
) |
Retrieve a list of users in a specified role.
$roleId | int optional (can leave as null to get all users in context) |
$contextId | int optional, include users only in this context |
$searchType | int optional, which field to search |
$search | string optional, string to match |
$searchMatch | string optional, type of match ('is' vs. 'contains' vs. 'startsWith') |
$dbResultRange | object DBRangeInfo object describing range of results to return |
Definition at line 52 of file RoleDAO.inc.php.
References DAO\retrieveRange().
RoleDAO::newDataObject | ( | ) |
Create new data object
Definition at line 38 of file RoleDAO.inc.php.
Referenced by getByUserId().
RoleDAO::userHasRole | ( | $contextId, | |
$userId, | |||
$roleId | |||
) |
Validation check to see if a user belongs to any group that has a given role
$contextId | int |
$userId | int |
$roleId | int|array ROLE_ID_... |
Definition at line 123 of file RoleDAO.inc.php.
References DAO\retrieve().
The RoleDAO::$userDao |
User DAO to return User objects when necessary *
Definition at line 24 of file RoleDAO.inc.php.