当前位置: 首页>>代码示例>>PHP>>正文


PHP User::getPlainPassword方法代码示例

本文整理汇总了PHP中AppBundle\Entity\User::getPlainPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP User::getPlainPassword方法的具体用法?PHP User::getPlainPassword怎么用?PHP User::getPlainPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppBundle\Entity\User的用法示例。


在下文中一共展示了User::getPlainPassword方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handleEvent

 private function handleEvent(User $user)
 {
     if (!$user->getPlainPassword()) {
         return;
     }
     $plainPassword = $user->getPlainPassword();
     $encoder = $this->encoderFactory->getEncoder($user);
     $password = $encoder->encodePassword($plainPassword, $user->getSalt());
     $user->setPassword($password);
 }
开发者ID:weaverryan,项目名称:symfony-guard-project,代码行数:10,代码来源:UserListener.php

示例2: handleEvent

 private function handleEvent(User $user)
 {
     if (!$user->getPlainPassword()) {
         return;
     }
     $plainPassword = $user->getPlainPassword();
     $encoder = $this->encoderFactory->getEncoder($user);
     $password = $encoder->encodePassword($plainPassword, $user->getSalt());
     $user->setPassword($password);
     //Make sure that a user has at least the role of ROLE_USER when created
     $roles = $user->getRoles();
     $user->setRoles($roles);
 }
开发者ID:onlinespaces,项目名称:symfony-guard-project,代码行数:13,代码来源:UserListener.php

示例3: updatePassword

 private function updatePassword(User $entity)
 {
     if ($entity->getPlainPassword()) {
         $password = $this->encoder->encodePassword($entity, $entity->getPlainPassword());
         $entity->setPassword($password);
     }
 }
开发者ID:drymek,项目名称:fcs-backend,代码行数:7,代码来源:PasswordListener.php

示例4: encodePassword

 private function encodePassword(User $user)
 {
     $plainPassword = $user->getPlainPassword();
     if (!is_null($plainPassword)) {
         $user->setPassword($this->passwordEncoder->encodePassword($user, $plainPassword));
     }
 }
开发者ID:neandher,项目名称:Symfony-Multiple-Authentication,代码行数:7,代码来源:EncodePasswordSubscriber.php

示例5: updatePassword

 /**
  * @param User $user
  */
 private function updatePassword(User $user)
 {
     $password = $user->getPlainPassword();
     if (0 !== strlen($password)) {
         $encoder = $this->encoder->getEncoder($user);
         $user->setPassword($encoder->encodePassword($password, $user->getSalt()));
         $user->eraseCredentials();
     }
 }
开发者ID:nemo-,项目名称:pro-daycare-shop,代码行数:12,代码来源:UserManager.php

示例6: save

 public function save(User $user)
 {
     $new = !$user->getId();
     $generatedPassword = $user->getPlainPassword();
     //TODO - permission?
     try {
         $this->entityManager->persist($user);
         $this->entityManager->flush();
     } catch (DBALException $e) {
         throw new UserException('Uživatel s tímto e-mailem již existuje');
     }
     if ($new) {
         $this->userCreate->send($user, $generatedPassword);
     }
 }
开发者ID:Nemrtvej,项目名称:symfony-template,代码行数:15,代码来源:UserFacade.php

示例7: getPlainPassword

 /**
  * {@inheritDoc}
  */
 public function getPlainPassword()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPlainPassword', []);
     return parent::getPlainPassword();
 }
开发者ID:reathh,项目名称:MotikarqSystem,代码行数:8,代码来源:__CG__AppBundleEntityUser.php


注:本文中的AppBundle\Entity\User::getPlainPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。