diff options
Diffstat (limited to 'core/Command/User/LastSeen.php')
-rw-r--r-- | core/Command/User/LastSeen.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Command/User/LastSeen.php b/core/Command/User/LastSeen.php index 37cad457015..e56ddd5087f 100644 --- a/core/Command/User/LastSeen.php +++ b/core/Command/User/LastSeen.php @@ -3,8 +3,8 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author Morris Jobke <hey@morrisjobke.de> * @author Pierre Ozoux <pierre@ozoux.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Core\Command\User; use OCP\IUserManager; @@ -55,15 +54,15 @@ class LastSeen extends Command { ); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('uid')); - if(is_null($user)) { + if (is_null($user)) { $output->writeln('<error>User does not exist</error>'); - return; + return 1; } $lastLogin = $user->getLastLogin(); - if($lastLogin === 0) { + if ($lastLogin === 0) { $output->writeln('User ' . $user->getUID() . ' has never logged in, yet.'); } else { @@ -72,5 +71,6 @@ class LastSeen extends Command { $output->writeln($user->getUID() . '`s last login: ' . $date->format('d.m.Y H:i')); } + return 0; } } |