mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
old boot.php functions replaced in src/module (4)
This commit is contained in:
parent
de6eabde58
commit
d47d78f2d4
22 changed files with 140 additions and 158 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Module\Security;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Response;
|
||||
|
@ -54,13 +55,13 @@ class PasswordTooLong extends \Friendica\BaseModule
|
|||
}
|
||||
|
||||
// check if the old password was supplied correctly before changing it to the new value
|
||||
User::getIdFromPasswordAuthentication(local_user(), $request['password_current']);
|
||||
User::getIdFromPasswordAuthentication(Session::getLocalUser(), $request['password_current']);
|
||||
|
||||
if (strlen($request['password_current']) <= 72) {
|
||||
throw new \Exception($this->l10n->t('Password does not need changing.'));
|
||||
}
|
||||
|
||||
$result = User::updatePassword(local_user(), $newpass);
|
||||
$result = User::updatePassword(Session::getLocalUser(), $newpass);
|
||||
if (!DBA::isResult($result)) {
|
||||
throw new \Exception($this->l10n->t('Password update failed. Please try again.'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue