mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
CS
This commit is contained in:
parent
0c00e52516
commit
eb570e49c8
3 changed files with 6 additions and 8 deletions
|
@ -110,6 +110,8 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
|||
private $trusted;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"})
|
||||
*/
|
||||
protected $clients;
|
||||
|
@ -306,10 +308,8 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
|
|||
*/
|
||||
public function getFirstClient()
|
||||
{
|
||||
if (empty($this->clients)) {
|
||||
return $this->clients;
|
||||
if (!empty($this->clients)) {
|
||||
return $this->clients->first();
|
||||
}
|
||||
|
||||
return $this->clients->first();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue