]> git.mxchange.org Git - friendica.git/commitdiff
Use Model\User::getById when possible in Module\Settings\Delegation
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 10 Oct 2019 08:10:57 +0000 (04:10 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 10 Oct 2019 08:10:57 +0000 (04:10 -0400)
src/Module/Settings/Delegation.php

index 5cb2f399ca46c84577e765bbc7e69f53ee33e922..247d16de03cb17c4d18b83d5fafc297b7f19082c 100644 (file)
@@ -62,7 +62,7 @@ class Delegation extends BaseSettingsModule
                                self::getApp()->internalRedirect('settings/delegation');
                        }
 
-                       $user = DBA::selectFirst('user', ['nickname'], ['uid' => $user_id]);
+                       $user = User::getById($user_id, ['nickname']);
                        if (DBA::isResult($user)) {
                                $condition = [
                                        'uid' => local_user(),
@@ -126,7 +126,7 @@ class Delegation extends BaseSettingsModule
 
                $parent_user = null;
                $parent_password = null;
-               $user = DBA::selectFirst('user', ['parent-uid', 'email'], ['uid' => local_user()]);
+               $user = User::getById(local_user(), ['parent-uid', 'email']);
                if (DBA::isResult($user) && !DBA::exists('user', ['parent-uid' => local_user()])) {
                        $parent_uid = $user['parent-uid'];
                        $parents = [0 => L10n::t('No parent user')];