Rewrite of the authentication and authorization system
This commit is contained in:
@@ -43,6 +43,18 @@ class Group extends Base
|
||||
return $this->getQuery()->eq('id', $group_id)->findOne();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific group by external id
|
||||
*
|
||||
* @access public
|
||||
* @param integer $external_id
|
||||
* @return array
|
||||
*/
|
||||
public function getByExternalId($external_id)
|
||||
{
|
||||
return $this->getQuery()->eq('external_id', $external_id)->findOne();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all groups
|
||||
*
|
||||
@@ -54,6 +66,18 @@ class Group extends Base
|
||||
return $this->getQuery()->asc('name')->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search groups by name
|
||||
*
|
||||
* @access public
|
||||
* @param string $input
|
||||
* @return array
|
||||
*/
|
||||
public function search($input)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->ilike('name', '%'.$input.'%')->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a group
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user