summaryrefslogtreecommitdiffstats
path: root/settings/ajax/changepassword.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-15 16:41:42 +0200
committerDaniel Molkentin <daniel@molkentin.de>2012-10-15 17:44:44 +0200
commit6b39b80648ea022cfb5839d1ac415912cafaa417 (patch)
tree4a8744fdd2f9cd5e4d361dd22ee896d71dd677b3 /settings/ajax/changepassword.php
parent6e045b9ea1f3435da3456d333a57753069b6bc8c (diff)
downloadnextcloud-server-6b39b80648ea022cfb5839d1ac415912cafaa417.tar.gz
nextcloud-server-6b39b80648ea022cfb5839d1ac415912cafaa417.zip
Change auth checks
Diffstat (limited to 'settings/ajax/changepassword.php')
-rw-r--r--settings/ajax/changepassword.php9
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';