From: Hypolite Petovan Date: Sun, 25 Nov 2018 01:56:38 +0000 (-0500) Subject: Update deprecated calls in Model\user and mod/removeme X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0bae80a2d331e9a78a38840566c8035b7fe105d4;p=friendica.git Update deprecated calls in Model\user and mod/removeme --- diff --git a/mod/removeme.php b/mod/removeme.php index 49b8f6d534..2f0eb2d37e 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -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 } diff --git a/src/Model/User.php b/src/Model/User.php index 65c7d8c973..aa05b492b0 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -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.