Redirect after registration does not work
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | login_red_after.mkv | 1.16 MB | lavanyatalwar |
| #18 | login_red_before.mkv | 1.24 MB | lavanyatalwar |
| #5 | Capture d’écran du 2025-01-07 01-52-56.png | 145.91 KB | zenimagine |
| #4 | image-2.png | 343.51 KB | prem suthar |
| #4 | image-1.png | 185.3 KB | prem suthar |
Issue fork login_destination-3497615
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sayan_k_dutta commentedWorking on it.
Comment #3
zenimagine commentedVery good thanks, so this is a known issue ?
Comment #4
prem suthar commentedi Have tried this but i cant reproduce the issue for me its working
For the drupal 11 and i have installed
composer require 'drupal/login_destination:2.x-dev@dev'this version of module.i have attached image for the configuration of the redirect for register user.
also for the register user settings.
Please share the step to reproduce
Comment #5
zenimagine commentedI am on version 8.x-2.0-beta8 which is more recent than the dev version
Comment #6
sayan_k_dutta commentedThe issue arises when the new account created needs to be validated through email or by admin. Seems like the redirection checking is bypassed if the user is not logged in. I am using version 2.x-dev@dev on drupal 10.3.10.
Comment #7
prem suthar commented@sayan_k_dutta If user validation is required through email or admin approval, direct user redirection is not feasible. This is because the process involves sending a one-time login link, which is used for the first login to set the password. In this scenario, redirection cannot be implemented directly.
Comment #8
prem suthar commented@zenimagine 8.x-2.0-beta8 in this version result is same.
Comment #9
sayan_k_dutta commentedSome specific case arise:
In these cases the user is still not logged in. So just after creating the account, will they be redirected to the set page?
Need others' thoughts.
Comment #10
sayan_k_dutta commented@prem suthar, thanks for the follow up, then I think the module works as designed.
Comment #11
zenimagine commentedThis is not the expected behavior. When the user registers (with admin approval), he is immediately redirected to the homepage of the website with an alert, indicating that instructions have been sent to him by email.
I don't want to show him the homepage, but /node/38
Can the module display something other than the homepage?
Comment #12
sayan_k_dutta commentedWe then have to modify the .module file to make the necessary changes. I am looking into it.
Comment #14
sayan_k_dutta commented@zenimagine, I have created MR !24 with the changes. Please check if it works.
Comment #15
sayan_k_dutta commentedComment #16
sayan_k_dutta commentedComment #17
zenimagine commentedGreat, I just tested it and it works. I only tested with accounts that need administrator approval.
Comment #18
lavanyatalwar commentedI just checked the functionality, and it looks good to me.
I am attaching screen recordings of the before and after states of applying the MR.
Moving it to RTBC.
Comment #19
lavanyatalwar commentedComment #22
rsvelko commentedThanks all. Fixed just now.
Releasing 8.x-2.0-beta9 for those who want to upgrade from release, and not use the module from a git clone.
Comment #23
sayan_k_dutta commentedHey @rsvelko !
Thank you for merging the MR and addressing the issue. However, it looks like the credit hasn't been assigned yet. Could you please take a moment to assign it? Thanks again!