diff options
Diffstat (limited to 'settings/ajax/changepassword.php')
-rw-r--r-- | settings/ajax/changepassword.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index b3ebbe6e456..5eab751b04e 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -3,14 +3,15 @@ // Init owncloud require_once '../../lib/base.php'; +// Check if we are a user +OCP\JSON::callCheck(); +OC_JSON::checkLoggedIn(); +OC_JSON::verifyUser(); + $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); $password = $_POST["password"]; $oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:''; -// Check if we are a user -OC_JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - $userstatus = null; if(OC_Group::inGroup(OC_User::getUser(), 'admin')) { $userstatus = 'admin'; |