]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/User.php
bump version 2023.12
[friendica.git] / src / Console / User.php
index bb0748d6f6f705bfcdb79568e64a3505a7f58d96..eb061ede31b10af8e751f40e80678cb9bd7bf24c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -25,7 +25,7 @@ use Console_Table;
 use Friendica\App;
 use Friendica\Content\Pager;
 use Friendica\Core\L10n;
-use Friendica\Core\PConfig\IPConfig;
+use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
 use Friendica\Model\Register;
 use Friendica\Model\User as UserModel;
 use Friendica\Util\Temporal;
@@ -48,7 +48,7 @@ class User extends \Asika\SimpleConsole\Console
         */
        private $l10n;
        /**
-        * @var IPConfig
+        * @var IManagePersonalConfigValues
         */
        private $pConfig;
 
@@ -88,7 +88,7 @@ HELP;
                return $help;
        }
 
-       public function __construct(App\Mode $appMode, L10n $l10n, IPConfig $pConfig, array $argv = null)
+       public function __construct(App\Mode $appMode, L10n $l10n, IManagePersonalConfigValues $pConfig, array $argv = null)
        {
                parent::__construct($argv);
 
@@ -97,7 +97,7 @@ HELP;
                $this->pConfig = $pConfig;
        }
 
-       protected function doExecute()
+       protected function doExecute(): int
        {
                if ($this->getOption('v')) {
                        $this->out('Class: ' . __CLASS__);
@@ -270,7 +270,7 @@ HELP;
        }
 
        /**
-        * Allows or denys a user based on it's nickname
+        * Allows or denies a user based on it's nickname
         *
         * @param bool $allow True, if the pending user is allowed, false if denies
         *
@@ -310,7 +310,7 @@ HELP;
         * @return bool True, if the delete was successful
         * @throws \Exception
         */
-       private function deleteUser()
+       private function deleteUser(): bool
        {
                $user = $this->getUserByNick(1);
 
@@ -370,7 +370,7 @@ HELP;
                                                $contact['url'],
                                                $contact['email'],
                                                Temporal::getRelativeDate($contact['created']),
-                                               Temporal::getRelativeDate($contact['login_date']),
+                                               Temporal::getRelativeDate($contact['last-activity']),
                                                Temporal::getRelativeDate($contact['last-item']),
                                        ]);
                                }
@@ -396,7 +396,7 @@ HELP;
                        'nickname',
                        'email',
                        'register_date',
-                       'login_date',
+                       'last-activity',
                        'verified',
                        'blocked',
                ];