Merge pull request #12391 from owncloud/fix_12361

use login name to verify password
This commit is contained in:
Björn Schießle 2014-11-24 17:06:48 +01:00
commit 949d7b3312

View file

@ -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) {