Commit 1645c8f8 authored by Bjoern Schiessle's avatar Bjoern Schiessle
Browse files

use login name to verify password

parent 168fce0b
......@@ -26,9 +26,10 @@ $newPassword = $_POST['newPassword'];
$view = new \OC\Files\View('/');
$session = new \OCA\Encryption\Session($view);
$user = \OCP\User::getUser();
$loginName = \OC::$server->getUserSession()->getLoginName();
// check new password
$passwordCorrect = \OCP\User::checkPassword($user, $newPassword);
$passwordCorrect = \OCP\User::checkPassword($loginName, $newPassword);
if ($passwordCorrect !== false) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment