summaryrefslogtreecommitdiffstats
path: root/lib/user/backend.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-05-08 09:07:11 +0200
committerBart Visscher <bartv@thisnet.nl>2012-05-10 09:14:26 +0200
commitac2e0cd6e450607585fbac2ec00a952744a4a36b (patch)
tree443abc4e841ea5a0355b67ed542f838ddde40612 /lib/user/backend.php
parenta9d7c67bf2e906fceea40b41f4780e623226fdff (diff)
downloadnextcloud-server-ac2e0cd6e450607585fbac2ec00a952744a4a36b.tar.gz
nextcloud-server-ac2e0cd6e450607585fbac2ec00a952744a4a36b.zip
Implement default functions in OC_User backend
Simplifies calling these functions, and makes code simpler functions: deleteUser getUsers userExists
Diffstat (limited to 'lib/user/backend.php')
-rw-r--r--lib/user/backend.php40
1 files changed, 32 insertions, 8 deletions
diff --git a/lib/user/backend.php b/lib/user/backend.php
index 4afdf152150..8c954338fb1 100644
--- a/lib/user/backend.php
+++ b/lib/user/backend.php
@@ -32,11 +32,8 @@ define('OC_USER_BACKEND_NOT_IMPLEMENTED', -501);
* actions that user backends can define
*/
define('OC_USER_BACKEND_CREATE_USER', 0x000001);
-define('OC_USER_BACKEND_DELETE_USER', 0x000010);
-define('OC_USER_BACKEND_SET_PASSWORD', 0x000100);
-define('OC_USER_BACKEND_CHECK_PASSWORD', 0x001000);
-define('OC_USER_BACKEND_GET_USERS', 0x010000);
-define('OC_USER_BACKEND_USER_EXISTS', 0x100000);
+define('OC_USER_BACKEND_SET_PASSWORD', 0x000010);
+define('OC_USER_BACKEND_CHECK_PASSWORD', 0x000100);
/**
@@ -47,11 +44,8 @@ abstract class OC_User_Backend {
protected $possibleActions = array(
OC_USER_BACKEND_CREATE_USER => 'createUser',
- OC_USER_BACKEND_DELETE_USER => 'deleteUser',
OC_USER_BACKEND_SET_PASSWORD => 'setPassword',
OC_USER_BACKEND_CHECK_PASSWORD => 'checkPassword',
- OC_USER_BACKEND_GET_USERS => 'getUsers',
- OC_USER_BACKEND_USER_EXISTS => 'userExists'
);
/**
@@ -83,4 +77,34 @@ abstract class OC_User_Backend {
public function implementsActions($actions){
return (bool)($this->getSupportedActions() & $actions);
}
+
+ /**
+ * @brief delete a user
+ * @param $uid The username of the user to delete
+ * @returns true/false
+ *
+ * Deletes a user
+ */
+ public function deleteUser( $uid ){
+ return false;
+ }
+
+ /**
+ * @brief Get a list of all users
+ * @returns array with all uids
+ *
+ * Get a list of all users.
+ */
+ public function getUsers(){
+ return array();
+ }
+
+ /**
+ * @brief check if a user exists
+ * @param string $uid the username
+ * @return boolean
+ */
+ public function userExists($uid){
+ return false;
+ }
}