diff options
author | Brice Maron <brice@bmaron.net> | 2012-10-23 22:37:23 +0400 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-10-23 22:37:23 +0400 |
commit | c8859774d559818baac07d37121b02e4919fdb3d (patch) | |
tree | afb98428a506138f34c7994240d185ed1513681c /django_auth | |
parent | 1f09b458031d39b043e22080f486612f8d8d22fa (diff) |
Try to match the new OC_User/Oc_Group backend interface for django_auth
Diffstat (limited to 'django_auth')
-rw-r--r-- | django_auth/lib/group.php | 14 | ||||
-rw-r--r-- | django_auth/lib/user.php | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/django_auth/lib/group.php b/django_auth/lib/group.php index b05e6a1fd..99d6d3178 100644 --- a/django_auth/lib/group.php +++ b/django_auth/lib/group.php @@ -58,7 +58,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * Deletes a group and removes it from the group_user-table */ - public static function deleteGroup( $gid ) { + public function deleteGroup( $gid ) { OC_Log::write('OC_Group_Django', 'Use the django webinterface to delete groups',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -71,7 +71,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * Checks whether the user is member of a group or not. */ - public static function inGroup( $uid, $gid ) { + public function inGroup( $uid, $gid ) { // Special case for the admin group if ($gid =='admin') { $sql = 'SELECT `auth_user`.`username` @@ -119,7 +119,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * Adds a user to a group. */ - public static function addToGroup( $uid, $gid ) { + public function addToGroup( $uid, $gid ) { OC_Log::write('OC_Group_Django', 'Use the django webinterface to add users to groups',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -132,7 +132,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * removes the user from a group. */ - public static function removeFromGroup( $uid, $gid ) { + public function removeFromGroup( $uid, $gid ) { OC_Log::write('OC_Group_Django', 'Use the django webinterface to remove users from groups',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -145,7 +145,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * This function fetches all groups a user belongs to. It does not check * if the user exists at all. */ - public static function getUserGroups( $uid ) { + public function getUserGroups( $uid ) { $query = OC_DB::prepare( 'SELECT `auth_group`.`name` FROM `auth_group` INNER JOIN `auth_user_groups` ON ( `auth_group`.`id` = `auth_user_groups`.`group_id` ) @@ -166,7 +166,7 @@ INNER JOIN `auth_user` ON ( `auth_user`.`id` = `auth_user_groups`.`use * * Returns a list with all groups */ - public static function getGroups() { + public function getGroups($search = '', $limit = -1, $offset = 0) { $query = OC_DB::prepare( "SELECT id, name FROM auth_group ORDER BY name" ); $result = $query->execute(); $groups = array(); @@ -181,7 +181,7 @@ INNER JOIN `auth_user` ON ( `auth_user`.`id` = `auth_user_groups`.`use * @brief get a list of all users in a group * @returns array with user ids */ - public static function usersInGroup($gid) { + public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) { $query = OC_DB::prepare('SELECT `auth_user`.`username` FROM `auth_user` INNER JOIN `auth_user_groups` diff --git a/django_auth/lib/user.php b/django_auth/lib/user.php index 63ae5bbbd..b7b90ce36 100644 --- a/django_auth/lib/user.php +++ b/django_auth/lib/user.php @@ -140,7 +140,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * * Get a list of all users. */ - public function getUsers() { + public function getUsers($search = '', $limit = 10, $offset = 0) { $query = OC_DB::prepare( 'SELECT id, username, is_active FROM `auth_user` WHERE is_active=1 ORDER BY username' ); $result = $query->execute(); $users = array(); |