Update deprecated calls in Model\user and mod/removeme

This commit is contained in:
Hypolite Petovan 2018-11-24 20:56:38 -05:00
parent 9d2f474c07
commit 0bae80a2d3
2 changed files with 3 additions and 2 deletions

View file

@ -57,7 +57,7 @@ function removeme_post(App $a)
]);
}
if (User::authenticate($a->user, trim($_POST['qxz_password']))) {
if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
User::remove($a->user['uid']);
// NOTREACHED
}

View file

@ -9,6 +9,7 @@ use DivineOmega\PasswordExposed;
use Exception;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -791,7 +792,7 @@ class User
$user = DBA::selectFirst('user', [], ['uid' => $uid]);
Addon::callHooks('remove_user', $user);
Hook::callAll('remove_user', $user);
// save username (actually the nickname as it is guaranteed
// unique), so it cannot be re-registered in the future.