|
|
|
@ -10,7 +10,6 @@ OC_JSON::verifyUser(); |
|
|
|
|
|
|
|
|
|
$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); |
|
|
|
|
$password = $_POST["password"]; |
|
|
|
|
$oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:''; |
|
|
|
|
|
|
|
|
|
$userstatus = null; |
|
|
|
|
if(OC_Group::inGroup(OC_User::getUser(), 'admin')) { |
|
|
|
@ -19,7 +18,7 @@ if(OC_Group::inGroup(OC_User::getUser(), 'admin')) { |
|
|
|
|
if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { |
|
|
|
|
$userstatus = 'subadmin'; |
|
|
|
|
} |
|
|
|
|
if(OC_User::getUser() == $username && OC_User::checkPassword($username, $oldPassword)) { |
|
|
|
|
if(OC_User::getUser() == $username) { |
|
|
|
|
$userstatus = 'user'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|