diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-19 19:32:59 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-19 19:32:59 +0200 |
commit | 91578883343d909da027790aa2458ad114b53aa0 (patch) | |
tree | 00d190ee9992da54d4e7d6ba93ac40cd0d7da4e8 /settings | |
parent | abb9f52dd7aea3df934d0db8d7f3218770e534f1 (diff) | |
download | nextcloud-server-91578883343d909da027790aa2458ad114b53aa0.tar.gz nextcloud-server-91578883343d909da027790aa2458ad114b53aa0.zip |
simplify code of changepassword.php
Diffstat (limited to 'settings')
-rw-r--r-- | settings/ajax/changepassword.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index a5122bdd9d5..fa778de5c95 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -15,18 +15,8 @@ $userstatus = null; if(OC_Group::inGroup(OC_User::getUser(), 'admin')){ $userstatus = 'admin'; } -if(OC_SubAdmin::isSubAdmin(OC_User::getUser())){ - $accessiblegroups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()); - $isuseraccessible = false; - foreach($accessiblegroups as $accessiblegroup){ - if(OC_Group::inGroup($username, $accessiblegroup)){ - $isuseraccessible = true; - break; - } - } - if($isuseraccessible){ - $userstatus = 'subadmin'; - } +if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){ + $userstatus = 'subadmin'; } if(OC_User::getUser() == $username && OC_User::checkPassword($username,$oldPassword)){ $userstatus = 'user'; |