<?php
if (!isset($foo['account_removed) || $foo['account_removed'])
?>
if (DI::args()->getArgc() > 1) {
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]);
- if (empty($owner) || $owner['account_removed']) {
+ if (!isset($owner['account_removed']) || $owner['account_removed']) {
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
}
* @return bool True, if the delete was successful
* @throws \Exception
*/
- private function deleteUser()
+ private function deleteUser(): bool
{
$user = $this->getUserByNick(1);
public static function load(App $a, string $nickname, bool $show_contacts = true)
{
$profile = User::getOwnerDataByNick($nickname);
- if (empty($profile) || !isset($profile['account_removed']) || $profile['account_removed']) {
+ if (!isset($profile['account_removed']) || $profile['account_removed']) {
Logger::info('profile error: ' . DI::args()->getQueryString());
return [];
}