2018-01-08 User

This commit is contained in:
Visman 2018-01-08 16:18:26 +07:00
parent 69d9817588
commit bf70d75ddc
2 changed files with 4 additions and 6 deletions

View file

@ -42,12 +42,10 @@ class Load extends Action
// число найденных пользователей отлично от одного
$count = count($data);
if ($count !== 1) {
if (1 !== $count || 1 === $data[0]['id']) {
return $count;
}
$user = $this->manager->create($data[0]);
return $user->isGuest ? 1 : $user;
return $this->manager->create($data[0]);
}
}

View file

@ -27,8 +27,8 @@ class Model extends DataModel
protected function getisGuest()
{
return $this->group_id == $this->c->GROUP_GUEST
|| $this->id < 2
|| empty($this->group_id);
|| $this->id < 2 //????
|| empty($this->group_id); //????
}
/**