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


PHP UserManagerInterface::updatePassword方法代码示例

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


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

示例1: updateUserFields

 /**
  * This must be called on prePersist and preUpdate if the event is about a
  * user.
  *
  * @param UserInterface $user
  */
 protected function updateUserFields(UserInterface $user)
 {
     if (null === $this->userManager) {
         $this->userManager = $this->container->get('fos_user.user_manager');
     }
     $this->userManager->updateCanonicalFields($user);
     $this->userManager->updatePassword($user);
 }
开发者ID:Dren-x,项目名称:mobitnew,代码行数:14,代码来源:AbstractUserListener.php

示例2: handleEvent

 private function handleEvent(LifecycleEventArgs $args)
 {
     if (null === $this->userManager) {
         $this->userManager = $this->container->get('fos_user.user_manager');
     }
     $entity = $args->getEntity();
     if ($entity instanceof UserInterface) {
         $this->userManager->updateCanonicalFields($entity);
         $this->userManager->updatePassword($entity);
     }
 }
开发者ID:renegare,项目名称:UserBundle,代码行数:11,代码来源:UserListener.php

示例3: handleEvent

 private function handleEvent(LifecycleEventArgs $args)
 {
     $entity = $args->getDocument();
     if ($entity instanceof UserInterface) {
         if (null === $this->userManager) {
             $this->userManager = $this->container->get('fos_user.user_manager');
         }
         $this->userManager->updateCanonicalFields($entity);
         $this->userManager->updatePassword($entity);
         if ($args instanceof PreUpdateEventArgs) {
             // We are doing a update, so we must force Doctrine to update the
             // changeset in case we changed something above
             $dm = $args->getDocumentManager();
             $uow = $dm->getUnitOfWork();
             $meta = $dm->getClassMetadata(get_class($entity));
             $uow->recomputeSingleDocumentChangeSet($meta, $entity);
         }
     }
 }
开发者ID:Herriniaina,项目名称:iVarotra,代码行数:19,代码来源:UserListener.php

示例4: updateUserFields

 /**
  * This must be called on prePersist and preUpdate if the event is about a
  * user.
  *
  * @param UserInterface $user
  */
 protected function updateUserFields(UserInterface $user)
 {
     if (null === $this->userDiscriminator) {
         $this->userDiscriminator = $this->container->get('rollerworks_multi_user.user_discriminator');
     }
     // Can only use the user manager when there is an user-system active
     if (null === $this->userDiscriminator->getCurrentUser() || true !== $this->userDiscriminator->getCurrentUserConfig()->getConfig('use_listener', true)) {
         return;
     }
     if (null === $this->userManager) {
         $this->userManager = $this->container->get('fos_user.user_manager');
     }
     $this->userManager->updateCanonicalFields($user);
     $this->userManager->updatePassword($user);
 }
开发者ID:buddhikajay,项目名称:RollerworksMultiUserBundle,代码行数:21,代码来源:AbstractUserListener.php


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