Linked Questions

16 votes
0 answers
11k views

How do I perform a redirect to a custom URL after login? [duplicate]

I am trying to redirect users to a custom URL after they logged in, but my code doesn't work. How do I redirect users after they logged in?
Gaurav's user avatar
  • 305
2 votes
1 answer
2k views

How can I redirect a user after login to the current page? [duplicate]

I have a Drupal 8 site. And I have approximately 5 pages in a site. For example if a user hits login from the contact-us page the user should not redirect anywhere, they should stay on same page. How ...
amit joshi's user avatar
-2 votes
1 answer
42 views

How does drupal 8 handles redirect respose? [duplicate]

Iam using a RedirectResponse in drupal 8 in my custom module when a user is logging in, $user = User::load(\Drupal::currentUser()->id()); $userRoles = $user->getRoles(); if(in_array('admin',$...
Sathish Sundar's user avatar
0 votes
0 answers
49 views

Why do I get redirected to userpage after login? [duplicate]

I land on the user profile page when I login as user. I would like to land on the front page after login. How do I achieve that? This is my basic site settings:
Vasmir's user avatar
  • 223
6 votes
2 answers
4k views

How to redirect user page to front page for specific roles

I want to redirect every users page to front page? like if user page url is /user/97 then it redirect to front page if user is not administrator. I want user page inaccessible to other users but only ...
tasqyn's user avatar
  • 173
0 votes
3 answers
1k views

How to redirect a user on login?

I have a registration form, when submitted, the user gets logged in automatically. I want to redirect the users to a specific page on login. Whether they are logged in using the login form or through ...
Ahmad's user avatar
  • 2,835
0 votes
1 answer
778 views

Redirect user after one-time-login

When users get an email with one time login link, they will arrive on a page to set their password (separated form via Password Separate Form) But once they click submit, it doesn't redirect them to ...
Camille B.'s user avatar
1 vote
1 answer
284 views

Automatically load pending draft

I'm using drupal 8 and webform module (multistep). In the webform submission settings, i enabled submit several drafts which adds the 'save' button for saving the progress. When the user logs out and ...
ram_griever's user avatar
-2 votes
1 answer
91 views

Constantly creating new Anonymous users

I find that my instance of drupal is always "creating" new anonymous users. I have an even on Create New User that simply logs the name to a file, and it is filled with entries like 2023-10-...
dmgig's user avatar
  • 129
0 votes
2 answers
56 views

There is no homepage URL

I have just started learning/working with Drupal and I am trying to build a theme for a website (something that has nothing to do with a blog other than the fact that the content is dynamically ...
Victor's user avatar
  • 103