wifang / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

Incorrect username or password produces two dialog boxes indicating failed login #422

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using custom login module. My problem is that when a user logs in and uses 
the wrong password or username combination then mollify produces two dialog 
boxes indicating the same thing. That being: that the username and password 
were incorrect. The user has to acknowledge them both before attempting to 
input the correct Username and P/W.

I only want the dialog box to come up once.

I am using 1.8.9.2 on a shared server. using linux (unknown version)

Has anyone seen this problem before? Do you know the script that handles the 
login error reporting? Can anyone give me some pointer. Cheers....Alan  

Original issue reported on code.google.com by alanboli...@gmail.com on 6 Oct 2012 at 10:21

GoogleCodeExporter commented 9 years ago
Can you post me your index.html and possible any other custom login scripts.

Original comment by samuli.j...@gmail.com on 6 Oct 2012 at 4:55

GoogleCodeExporter commented 9 years ago
Yes, I see the problem. The custom login package was meant to show only how to 
use Mollify API to create custom login page, and not to be actual complete 
solution (more like "hello world" type of example).

The script registers click handler for the login button on every time login 
part is shown. This means also after the user has logged out.

The problem here is that the login part is never removed, only hidden, and thus 
it would not need re-registering the click event when it is shown for the 
second time. Now every time the login is shown, another click handler is added, 
and when you click the button, it is executed twice.

Simply move the "$("#btn-login").click(onLogin);" from function showLogin into 
plugin initialize function.

Original comment by samuli.j...@gmail.com on 6 Oct 2012 at 7:34

GoogleCodeExporter commented 9 years ago

Original comment by samuli.j...@gmail.com on 11 Sep 2013 at 2:40