utilize UserService for SAML (#4748)
This commit is contained in:
@@ -136,7 +136,7 @@ final class ProfileController extends AbstractController
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$userService->updateUser($profile);
|
||||
$userService->saveUser($profile);
|
||||
|
||||
$this->flashSuccess('action.update.success');
|
||||
|
||||
@@ -409,7 +409,7 @@ final class ProfileController extends AbstractController
|
||||
{
|
||||
if (!$profile->hasTotpSecret()) {
|
||||
$profile->setTotpSecret($totpAuthenticator->generateSecret());
|
||||
$userService->updateUser($profile);
|
||||
$userService->saveUser($profile);
|
||||
}
|
||||
|
||||
$data = new TotpActivation($profile);
|
||||
@@ -423,7 +423,7 @@ final class ProfileController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$profile->enableTotpAuthentication();
|
||||
$userService->updateUser($profile);
|
||||
$userService->saveUser($profile);
|
||||
|
||||
$this->flashSuccess('action.update.success');
|
||||
|
||||
@@ -473,7 +473,7 @@ final class ProfileController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$profile->disableTotpAuthentication();
|
||||
$userService->updateUser($profile);
|
||||
$userService->saveUser($profile);
|
||||
|
||||
$this->flashSuccess('action.update.success');
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ final class PasswordResetController extends AbstractController
|
||||
$this->eventDispatcher->dispatch(new EmailEvent($event->getEmail()));
|
||||
|
||||
$user->markPasswordRequested();
|
||||
$this->userService->updateUser($user);
|
||||
$this->userService->saveUser($user);
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('resetting_check_email', ['username' => $username]);
|
||||
@@ -146,7 +146,7 @@ final class PasswordResetController extends AbstractController
|
||||
$user->markPasswordResetted();
|
||||
$user->setEnabled(true);
|
||||
|
||||
$this->userService->updateUser($user);
|
||||
$this->userService->saveUser($user);
|
||||
|
||||
$response = $this->redirectToRoute('my_profile');
|
||||
$loginManager->logInUser($user, $response);
|
||||
|
||||
@@ -69,7 +69,7 @@ final class SelfRegistrationController extends AbstractController
|
||||
|
||||
$request->getSession()->set('confirmation_email_address', $user->getEmail());
|
||||
|
||||
$this->userService->saveNewUser($user);
|
||||
$this->userService->saveUser($user);
|
||||
|
||||
return $this->redirectToRoute('user_registration_check_email');
|
||||
}
|
||||
@@ -126,7 +126,7 @@ final class SelfRegistrationController extends AbstractController
|
||||
$user->setConfirmationToken(null);
|
||||
$user->setEnabled(true);
|
||||
|
||||
$this->userService->updateUser($user);
|
||||
$this->userService->saveUser($user);
|
||||
|
||||
$response = $this->redirectToRoute('registration_confirmed');
|
||||
$loginManager->logInUser($user, $response);
|
||||
|
||||
@@ -35,7 +35,7 @@ final class WizardController extends AbstractController
|
||||
|
||||
if ($wizard === 'intro') {
|
||||
$user->setWizardAsSeen('intro');
|
||||
$userService->updateUser($user);
|
||||
$userService->saveUser($user);
|
||||
|
||||
return $this->render('wizard/intro.html.twig', [
|
||||
'percent' => 0,
|
||||
@@ -77,7 +77,7 @@ final class WizardController extends AbstractController
|
||||
$user->setTimezone($data[UserPreference::TIMEZONE]);
|
||||
$user->setPreferenceValue(UserPreference::SKIN, $data[UserPreference::SKIN]);
|
||||
$user->setWizardAsSeen('profile');
|
||||
$userService->updateUser($user);
|
||||
$userService->saveUser($user);
|
||||
|
||||
if ($data['reload'] === '1') {
|
||||
return $this->redirectToRoute('wizard', ['wizard' => 'profile', '_locale' => $user->getLanguage()]);
|
||||
@@ -104,7 +104,7 @@ final class WizardController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$user->setRequiresPasswordReset(false);
|
||||
$userService->updateUser($user);
|
||||
$userService->saveUser($user);
|
||||
|
||||
return $this->redirectToRoute('wizard', ['wizard' => 'done']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user