Display missing user notification message by using Ajax Login-Register and Ajax plugin - logintobogg

来源:互联网 发布:淘宝网天猫皮衣 编辑:程序博客网 时间:2024/05/17 01:26

我实在是懒得翻译了。反正也是我写的,当玩吧,拿上来看看,我以后没事会多写点code小心得的哈哈。


I used Ajax Login-Register for user login and register, so when user click the Register link it will pop up the form, it's cool.
And I also want to use both username and email to login so I installed the Ajax plugin - logintoboggan module(need logintoboggan), it's work.

But something troublesome come, when user finished the register form and click the "create an new account" button, normally there will be a message ''Your password and further instructions have been sent to your e-mail address." display in the pop up, but when I add the Ajax plugin - logintoboggan module I found there is no message displayed and the page redirect to the front page. I used a lot of time try to make it display again but failed.

Finally, I little angry ("ya~ hei ya!" angry bird :) )
So I just guess and quickly search the code and try solve it on code layer.
It must be something wrong in Ajax plugin - logintoboggan module this module make the page redirect an no message show, at least I guess so, and what I do is just find the place and comment the code.
see logintoboggan.module at line 401
I comment the code below:
// if($reg_pass_set && variable_get('logintoboggan_immediate_login_on_register', TRUE)) {
// $form_state['redirect'] = logintoboggan_process_login($account, $edit, $redirect);
// }
// else {
// // Redirect to the appropriate page.
// $form_state['redirect'] = $redirect;
// }
ok it's worked, I'm happy.
I think there are should be more details I should research but I'm so tired now, maybe more explanation next time,
I just want to share it, and wish it can help you.