Skip to content
Snippets Groups Projects

3349124-redirect-after-registration/password-reset:Created the functionality of User Redirect After Registration/Password Reset.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
205 219 $logout = $form_state->getValue('logout');
220 $register_redirect = $form_state->getValue('registration_redirect');
221 $password_redirect = $form_state->getValue('password_reset_redirect');
206 222 $users_roles = $this->getUserRoles();
207 223
224
225 if (!empty($password_redirect) && !$this->pathValidator->isValid($password_redirect)) {
226 if (!UrlHelper::isValid($password_redirect, TRUE) && !UrlHelper::isExternal($password_redirect)) {
227 $form_state->setErrorByName('password_reset_redirect', $this->t('<strong>Password Reset Redirect URL:</strong> Redirect URL is invalid.'));
228
229 }
230 }
231
232 if (!empty($register_redirect) && !$this->pathValidator->isValid($register_redirect)) {
233 if (!UrlHelper::isValid($register_redirect, TRUE) && !UrlHelper::isExternal($register_redirect)) {
234 $form_state->setErrorByName('registration_redirect', $this->t('<strong>Password Reset Redirect URL:</strong> Redirect URL is invalid.'));
  • Rajdip Roy
    Rajdip Roy @rajdip_755 started a thread on commit 4e67fb55
  • 72 }
    73 else {
    74 // If it's a relative URL.
    75 $url = Url::fromUserInput($destination);
    76 }
    77
    78 // Redirecting the user to the specified destination.
    79 $form_state->setRedirectUrl($url);
    80 }
    81
    82 /**
    83 * Implements hook_user_update().
    84 */
    85 function user_redirect_user_update(UserInterface $account) {
    86 // Checking if the password has been updated.
    87 // dd($account->pass->value);
  • Uttam Karmakar added 6 commits

    added 6 commits

    • 4e67fb55...539942ca - 5 commits from branch project:2.0.x
    • c186f333 - 3349124-redirect-after-registration/password-reset: Resolved the merge conflicts.

    Compare with previous version

  • added 1 commit

    • d99b14f3 - 3349124-redirect-after-registration/password-reset: Fixes the phpcs errors.

    Compare with previous version

  • added 1 commit

    • ecc72cc5 - Issue #3349124: External redirect added and registration redirect URL overrides role URL.

    Compare with previous version

  • Please register or sign in to reply
    Loading