FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\UserDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\UserDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, Logger $logger)
 
 getUserChoices ($groupId=null)
 
 getAdminGroupMap ($userId, $userLevel=0)
 get array of groups that this user has admin access to More...
 
 getUserGroupMap ($userId)
 get array of groups that this user has admin access to More...
 
 getDeletableAdminGroupMap ($userId, $userLevel=0)
 get array of groups that this user has admin access to More...
 
 deleteGroup ($groupId)
 Delete a group (for constraint, see http://www.fossology.org/projects/fossology/wiki/GroupsPerms ) More...
 
 updateUserTable ()
 
 getUserByName ($userName)
 
 getUserByPk ($userPk)
 
 getGroupIdByName ($groupName)
 
 setDefaultGroupMembership ($userId, $groupId)
 
 getUserAndDefaultGroupByUserName ($userName)
 
 isAdvisorOrAdmin ($userId, $groupId)
 
 addGroup ($groupName)
 
 addGroupMembership ($groupId, $userId)
 
 getUserName ($userId)
 
 getGroupNameById ($groupId)
 
 getUserEmail ($userId)
 

Public Attributes

const USER = 0
 
const ADMIN = 1
 
const ADVISOR = 2
 
const SUPER_USER = 'fossy'
 

Private Member Functions

 getUserByPermission ($permission)
 
 fixDefaultGroup ($userId, $groupName)
 

Private Attributes

 $dbManager
 
 $logger
 
 $session
 

Detailed Description

Definition at line 27 of file UserDao.php.

Member Function Documentation

Fossology\Lib\Dao\UserDao::addGroup (   $groupName)
Parameters
string$groupNameraw group name as entered by the user
Returns
int $groupId
Exceptions

Definition at line 339 of file UserDao.php.

Fossology\Lib\Dao\UserDao::deleteGroup (   $groupId)

Delete a group (for constraint, see http://www.fossology.org/projects/fossology/wiki/GroupsPerms )

Parameters
$groupId
Exceptions

Definition at line 147 of file UserDao.php.

Fossology\Lib\Dao\UserDao::fixDefaultGroup (   $userId,
  $groupName 
)
private
Parameters
int$userId
string$groupName
Returns
array with keys 'group_fk', 'group_name'

Definition at line 309 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getAdminGroupMap (   $userId,
  $userLevel = 0 
)

get array of groups that this user has admin access to

Parameters
int$userId
Returns
array in the format {group_pk=>group_name, group_pk=>group_name, ...}

Definition at line 77 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getDeletableAdminGroupMap (   $userId,
  $userLevel = 0 
)

get array of groups that this user has admin access to

Parameters
int$userId
Returns
array in the format {group_pk=>group_name, group_pk=>group_name, ...}

Definition at line 118 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getGroupIdByName (   $groupName)
Parameters
$groupName
Returns
array

Definition at line 261 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getGroupNameById (   $groupId)
Parameters
$groupId
Returns
array

Definition at line 385 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserByName (   $userName)
Parameters
$userName
Returns
array

Definition at line 243 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserByPermission (   $permission)
private
Parameters
$permission
Returns
array

Definition at line 271 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserByPk (   $userPk)
Parameters
$userPk
Returns
array

Definition at line 252 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserChoices (   $groupId = null)
Returns
array

Definition at line 54 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserEmail (   $userId)
Parameters
int$userId
Returns
string

Definition at line 398 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserGroupMap (   $userId)

get array of groups that this user has admin access to

Parameters
int$userId
Returns
array in the format {group_pk=>group_name, group_pk=>group_name, ...}

Definition at line 100 of file UserDao.php.

Fossology\Lib\Dao\UserDao::getUserName (   $userId)
Parameters
int$userId
Returns
string

Definition at line 372 of file UserDao.php.

Fossology\Lib\Dao\UserDao::setDefaultGroupMembership (   $userId,
  $groupId 
)
Parameters
int$userId
int$groupId

Definition at line 280 of file UserDao.php.


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