Автор: Adam Piotrowski (adam@wellcommerce.org)
 public function resetPasswordForUser(UserInterface $user)
 {
     $password = Helper::generateRandomPassword();
     $user->setPassword($password);
     $this->manager->updateResource($user);
     $this->mailerHelper->sendEmail(['recipient' => $user->getEmail(), 'subject' => 'user.email.title.reset_password', 'template' => 'WellCommerceAdminBundle:Admin/Email:reset_password.html.twig', 'parameters' => ['user' => $user, 'password' => $password], 'configuration' => $this->shopStorage->getCurrentShop()->getMailerConfiguration()]);
 }
Пример #2
0
 private function findCurrentOrder()
 {
     $sessionId = $this->requestHelper->getSessionId();
     $client = $this->securityHelper->getCurrentClient();
     $shop = $this->shopStorage->getCurrentShop();
     return $this->orderManager->findOrder($sessionId, $client, $shop);
 }
Пример #3
0
 public function getCurrentShop() : ShopInterface
 {
     return $this->shopStorage->getCurrentShop();
 }