本文整理汇总了PHP中FOS\UserBundle\Model\UserManagerInterface::findUserByEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManagerInterface::findUserByEmail方法的具体用法?PHP UserManagerInterface::findUserByEmail怎么用?PHP UserManagerInterface::findUserByEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOS\UserBundle\Model\UserManagerInterface
的用法示例。
在下文中一共展示了UserManagerInterface::findUserByEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUserByEmailPw
/**
* @param string $email
* @param string $pw
* @return \FOS\UserBundle\Model\UserInterface|null
*/
function getUserByEmailPw($email, $pw)
{
$result = null;
if ($email && $pw) {
$user = $this->_fosUserManager->findUserByEmail($email);
if ($user && $this->isPasswordValid($user, $pw)) {
$result = $user;
}
}
return $result;
}
示例2: hydrate
/**
* @param HookInterface $apiService
* @param string $entityName
* @return mixed $entityName instance
*/
public function hydrate(HookInterface $apiService, $entityName)
{
$hydratedEntity = new $entityName();
if (!$hydratedEntity instanceof HookEventInterface) {
throw new LogicException("Can't hydrate this event");
}
$hydratedEntity->setEmail($apiService->getEmail());
$hydratedEntity->setName($apiService->getService());
$hydratedEntity->setMetaData($apiService->getMetaData());
$user = $this->userManager->findUserByEmail($apiService->getEmail());
$hydratedEntity->setUser($user);
return $hydratedEntity;
}
示例3: findUserByEmail
public function findUserByEmail($mail)
{
return $this->userManager->findUserByEmail($mail);
}