Skip to content
Snippets Groups Projects
Commit 09092dd2 authored by Robin Appelman's avatar Robin Appelman
Browse files

check for old password when changing passwords

parent ae4c83af
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
$password = $_POST["password"];
// Check if we are a user
if( !OC_User::isLoggedIn() || (!OC_Group::inGroup( OC_User::getUser(), 'admin' )&& $username!=OC_User::getUser())) {
if( !OC_User::isLoggedIn() || (!OC_Group::inGroup( OC_User::getUser(), 'admin' ) && ($username!=OC_User::getUser() || !OC_User::checkPassword($username,$password)))) {
echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" )));
exit();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment