* finish task#1203.
* code for task#1323.
This commit is contained in:
@@ -130,6 +130,22 @@ class groupModel extends model
|
||||
return $this->dao->findById($groupID)->from(TABLE_GROUP)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group by account.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByAccount($account)
|
||||
{
|
||||
return $this->dao->select('t2.*')->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_GROUP)->alias('t2')
|
||||
->on('t1.group = t2.id')
|
||||
->where('t1.account')->eq($account)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get privileges of a groups.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user