Here is another small extension for the redirect mimic of this module. It should follow Drupal's default behavior by accepting the destination url parameter after login. The attached patch is implementing this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Spleshka’s picture

Status: Active » Needs work

What about other form? User register and password recovery form also needs in feature. Could you please provide a patch for a three forms?

jurgenhaas’s picture

Status: Needs work » Needs review
FileSize
1.39 KB

OK, here comes another patch that works for both the login and the register form. However, the password reset form doesn't do any redirect (yet), so it doesn't have to deal with any url parameters either.

jagermonster’s picture

Is this going to find its way into the module as i think this is really good to have?
Perhaps making this a configurable option for this module so it can be enabled/disabled?

jurgenhaas’s picture

Looks like the above patch doesn't apply anymore and I have rewrtten the whole thing to the changed structure of this module. Please review the attached patch and let me know if this works for you.

Spleshka’s picture

Status: Needs review » Needs work

Hi,

Your patch is won't works because when form was submitted her #action is /ajax_register/[type]/nojs. So "destination" param is not appends to the url.

Altynay’s picture

Version: 7.x-4.x-dev » 7.x-4.0-rc10
Assigned: Unassigned » Altynay
Category: feature » bug
Priority: Normal » Major

Hello, my English is not super, but I'll try to explain my problem.
I use three modules Ajax login-register, Captcha, Image captcha Refresh. I set 8 symbols for captcha. When I enter 8 right symbols - everything is ok.
But if at first time I enter wrong symbols for captcha, then after refreshing captcha image and entering right symbols for captcha, it's redirecting to page /ajax_register/register/ajax with text:
"[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"touch","theme_token":"MAUJHfaHX0vBlP29g5HcPYAGghuaWRQnu35nJM1v9Mc"}},"merge":true},{"command":"redirect","url":"\/registration-complete\/125","delay":0}]".
Please, help!

Spleshka’s picture

@Altynay,
Just tried Ajax login register + Captcha + Image captcha refresh - everything works properly! So bug not in my module.

i.bajrai’s picture

Issue summary: View changes
FileSize
606 bytes

Patch #4 does not work because the user_login_form_submit function always sets the form redirect.

heyyo’s picture

Status: Needs work » Reviewed & tested by the community

Patch in #8 works great for me.

SokoL_BY’s picture

I have the same problem like @Altynay
I use Ajax Login/Register + uLogin, after user login via social network (uLogin) it's redirecting to: ajax_register/login/ajax and on white screen i see JSON code. what's wrong? I installed all path from current topic.

p.s. Sorry for my English.

-------------
Fixed https://www.drupal.org/node/2287799