Fix Users manager
This commit is contained in:
parent
1d1de81d49
commit
69a182303e
1 changed files with 6 additions and 6 deletions
|
@ -37,7 +37,7 @@ class Users extends Manager
|
|||
if ($this->isset($id)) {
|
||||
return $this->get($id);
|
||||
} else {
|
||||
$user = $this->Load->load($id);
|
||||
$user = $this->load->load($id);
|
||||
$this->set($id, $user);
|
||||
|
||||
return $user;
|
||||
|
@ -66,7 +66,7 @@ class Users extends Manager
|
|||
return $result;
|
||||
}
|
||||
|
||||
foreach ($this->Load->loadByIds($data) as $user) {
|
||||
foreach ($this->load->loadByIds($data) as $user) {
|
||||
if ($user instanceof User) {
|
||||
$result[$user->id] = $user;
|
||||
$this->set($user->id, $user);
|
||||
|
@ -100,7 +100,7 @@ class Users extends Manager
|
|||
*/
|
||||
public function loadByName(string $name, bool $caseInsencytive = false): ?User
|
||||
{
|
||||
return $this->returnUser($this->Load->loadByName($name, $caseInsencytive));
|
||||
return $this->returnUser($this->load->loadByName($name, $caseInsencytive));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -108,7 +108,7 @@ class Users extends Manager
|
|||
*/
|
||||
public function loadByEmail(string $email): ?User
|
||||
{
|
||||
return $this->returnUser($this->Load->loadByEmail($email));
|
||||
return $this->returnUser($this->load->loadByEmail($email));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ class Users extends Manager
|
|||
*/
|
||||
public function update(User $user): User
|
||||
{
|
||||
return $this->Save->update($user);
|
||||
return $this->save->update($user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,7 +124,7 @@ class Users extends Manager
|
|||
*/
|
||||
public function insert(User $user): int
|
||||
{
|
||||
$id = $this->Save->insert($user);
|
||||
$id = $this->save->insert($user);
|
||||
$this->set($id, $user);
|
||||
|
||||
return $id;
|
||||
|
|
Loading…
Add table
Reference in a new issue