Rewrite of the authentication and authorization system

This commit is contained in:
Frederic Guillot
2015-12-05 20:31:27 -05:00
parent 346b8312e5
commit e9fedf3e5c
255 changed files with 14114 additions and 9820 deletions

View File

@@ -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
*