|
@@ 655-664 (lines=10) @@
|
| 652 |
|
* |
| 653 |
|
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if a user with the given credentials was not found |
| 654 |
|
*/ |
| 655 |
|
public function loadUserByLogin($login, array $prioritizedLanguages = []) |
| 656 |
|
{ |
| 657 |
|
if (!is_string($login) || empty($login)) { |
| 658 |
|
throw new InvalidArgumentValue('login', $login); |
| 659 |
|
} |
| 660 |
|
|
| 661 |
|
$spiUser = $this->userHandler->loadByLogin($login); |
| 662 |
|
|
| 663 |
|
return $this->buildDomainUserObject($spiUser, null, $prioritizedLanguages); |
| 664 |
|
} |
| 665 |
|
|
| 666 |
|
/** |
| 667 |
|
* Loads a user for the given email. |
|
@@ 703-712 (lines=10) @@
|
| 700 |
|
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 701 |
|
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue |
| 702 |
|
*/ |
| 703 |
|
public function loadUserByToken($hash, array $prioritizedLanguages = []) |
| 704 |
|
{ |
| 705 |
|
if (!is_string($hash) || empty($hash)) { |
| 706 |
|
throw new InvalidArgumentValue('hash', $hash); |
| 707 |
|
} |
| 708 |
|
|
| 709 |
|
$spiUser = $this->userHandler->loadUserByToken($hash); |
| 710 |
|
|
| 711 |
|
return $this->buildDomainUserObject($spiUser, null, $prioritizedLanguages); |
| 712 |
|
} |
| 713 |
|
|
| 714 |
|
/** |
| 715 |
|
* This method deletes a user. |