Ejemplo n.º 1
0
 public function initializePassword(User $user)
 {
     $user->setHashTime(time());
     $password = sha1(rand(1000, 10000) . $user->getUsername() . $user->getSalt());
     $user->setResetPasswordHash($password);
     $this->objectManager->persist($user);
     $this->objectManager->flush();
 }