2018-01-08 User
This commit is contained in:
parent
69d9817588
commit
bf70d75ddc
2 changed files with 4 additions and 6 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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); //????
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue