Use getByNickname as suggested in code review.

This commit is contained in:
very-ape 2021-05-21 10:15:32 -07:00
parent fe52719d37
commit 93926e99b8

View File

@ -145,7 +145,7 @@ class Profile
*/ */
public static function load(App $a, $nickname, array $profiledata = [], $show_connect = true) public static function load(App $a, $nickname, array $profiledata = [], $show_connect = true)
{ {
$user = DBA::selectFirst('user', [], ['nickname' => $nickname, 'account_removed' => false]); $user = User::getByNickname($nickname);
if (!DBA::isResult($user) && empty($profiledata)) { if (!DBA::isResult($user) && empty($profiledata)) {
Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG); Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG);