diff --git a/Persistence/User/Handler.php b/Persistence/User/Handler.php index 3dc867c4a..fa6c1d36a 100644 --- a/Persistence/User/Handler.php +++ b/Persistence/User/Handler.php @@ -65,6 +65,17 @@ public function loadByLogin($login); */ public function loadByEmail($email); + /** + * Loads user with user hash. + * + * @param string $hash + * + * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If user is not found + * + * @return \eZ\Publish\SPI\Persistence\User + */ + public function loadUserByToken($hash); + /** * Update the user information specified by the user struct. * @@ -72,6 +83,20 @@ public function loadByEmail($email); */ public function update(User $user); + /** + * Update the user information specified by the user token struct. + * + * @param \eZ\Publish\SPI\Persistence\User\UserTokenUpdateStruct $userTokenUpdateStruct + */ + public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct); + + /** + * Expires user token with user hash. + * + * @param string $hash + */ + public function expireUserToken($hash); + /** * Delete user with the given ID. * diff --git a/Persistence/User/UserTokenUpdateStruct.php b/Persistence/User/UserTokenUpdateStruct.php new file mode 100644 index 000000000..4e9cb1611 --- /dev/null +++ b/Persistence/User/UserTokenUpdateStruct.php @@ -0,0 +1,39 @@ +