當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。