summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-02-18 21:20:48 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-02-18 21:20:48 +0300
commit06dbcec5a17691d7d31e52cabba94316f040f13b (patch)
treeade2ac3d9261b90d183e9a6e5c3d88ffe2004ca7 /settings
parentc5f6a77dbd4480874a1907dec1ad222e03713b22 (diff)
downloadnextcloud-server-06dbcec5a17691d7d31e52cabba94316f040f13b.tar.gz
nextcloud-server-06dbcec5a17691d7d31e52cabba94316f040f13b.zip
Do not set password if it has't provided
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/changepassword.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index ceb4bbeecb0..1fc6d0e1000 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -8,7 +8,7 @@ OC_JSON::checkLoggedIn();
OC_APP::loadApps();
$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
-$password = $_POST["password"];
+$password = isset($_POST["password"]) ? $_POST["password"] : null;
$oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:'';
$userstatus = null;
@@ -28,7 +28,7 @@ if(is_null($userstatus)) {
}
// Return Success story
-if( OC_User::setPassword( $username, $password )) {
+if(!is_null($password) && OC_User::setPassword( $username, $password )) {
OC_JSON::success(array("data" => array( "username" => $username )));
}
else{