diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-06-23 18:23:06 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-06-23 18:23:47 +0200 |
commit | 8b76590f5db0c2c94dcf3e868d0e39494a1e39b1 (patch) | |
tree | c0283fb5029e0ac8fdcedc6ccac9f9209d83d3be /lib/user.php | |
parent | 6452f5b5cb76b4a26ae8f114a55d09cfd482be52 (diff) | |
download | nextcloud-server-8b76590f5db0c2c94dcf3e868d0e39494a1e39b1.tar.gz nextcloud-server-8b76590f5db0c2c94dcf3e868d0e39494a1e39b1.zip |
fix creating users
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/user.php b/lib/user.php index 33ee5b8762a..25f555b47b1 100644 --- a/lib/user.php +++ b/lib/user.php @@ -166,7 +166,9 @@ class OC_USER { if( $run ){ //delete the user from all backends foreach(self::$_usedBackends as $backend){ - $backend->deleteUser($uid); + if($backend->implementsActions(OC_USER_BACKEND_DELETE_USER)){ + $backend->deleteUser($uid); + } } // We have to delete the user from all groups foreach( OC_GROUP::getUserGroups( $uid ) as $i ){ @@ -270,8 +272,10 @@ class OC_USER { if( $run ){ foreach(self::$_usedBackends as $backend){ - if($backend->userExists($uid)){ - $backend->setPassword($uid,$password); + if($backend->implementsActions(OC_USER_BACKEND_SET_PASSWORD)){ + if($backend->userExists($uid)){ + $backend->setPassword($uid,$password); + } } } OC_HOOK::emit( "OC_USER", "post_setPassword", array( "uid" => $uid, "password" => $password )); @@ -292,9 +296,11 @@ class OC_USER { */ public static function checkPassword( $uid, $password ){ foreach(self::$_usedBackends as $backend){ - $result=$backend->checkPassword( $uid, $password ); - if($result===true){ - return true; + if($backend->implementsActions(OC_USER_BACKEND_CHECK_PASSWORD)){ + $result=$backend->checkPassword( $uid, $password ); + if($result===true){ + return true; + } } } } @@ -322,9 +328,11 @@ class OC_USER { */ public static function userExists($uid){ foreach(self::$_usedBackends as $backend){ - $result=$backend->userExists($uid); - if($result===true){ - return true; + if($backend->implementsActions(OC_USER_BACKEND_USER_EXISTS)){ + $result=$backend->userExists($uid); + if($result===true){ + return true; + } } } return false; |