Browse Source

Update deprecated calls in Model\user and mod/removeme

pull/6198/head
Hypolite Petovan 2 years ago
parent
commit
0bae80a2d3
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      mod/removeme.php
  2. +2
    -1
      src/Model/User.php

+ 1
- 1
mod/removeme.php 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
}


+ 2
- 1
src/Model/User.php 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.


Loading…
Cancel
Save