public function activateUser(User $user)
    {
        $user->setIsEnabled(true);
        $user->setIsMailValidated(true);
        $user->setResetPasswordHash(null);
        $user->setInitDate(new \DateTime());

        $this->objectManager->persist($user);
        $this->objectManager->flush();
    }
public function activateUser(User $user)
    {
        $user->setIsEnabled(true);
        $user->setIsMailValidated(true);
        $user->setResetPasswordHash(null);
        $user->setInitDate(new \DateTime());

        $this->objectManager->persist($user);
        $this->objectManager->flush();
    }
public function activateUser ( User $ user ) { $ user -> setIsEnabled ( true ) ; $ user -> setIsMailValidated ( true ) ; $ user -> setResetPasswordHash ( null ) ; $ user -> setInitDate ( new \ DateTime ( ) ) ; $ this -> objectManager -> persist ( $ user ) ; $ this -> objectManager -> flush ( ) ; }
Activates a User and set the init date to now.

@param User $user
Activates a User and set the init date to now .