Display Login Fail Message

How do i display a message when the username or password are incorrect or unkown? Is there another tag to use in the login_form design area?

No body have any idea’s on this?


I’ve looked at a few of the websites that Squiz have created and there is a few that have this.



This one has it Computer Arts

Computer Arts is using an Account Manager page to provide the login dialog box. The keyword for the error message is %login_error% and is valid on the Not Logged In bodycopy (as this gets reloaded in the event of a login error).


If you're creating a login design, the following code will print the error:



[html]<MySource_PRINT var="system_messages" escape="yes" />[/html]

Thanks for that.


I've noticed that even if i use a user that does exist but the password is incorrect it displays the message "User not found"?



It also does this when logging into the admin GUI. I was logging into the admin GUI with the root user (so root) and i entered the password wrong but still said user not found.

This is a security feature: Instead of providing any information that may make brute force attacks easier, we always present a "User Not Found" error instead. That way, there is no confirmation of a successful username attempt.

I have tried doing this but i get the following error in the backend





[quote]MySource Warning

File: [SYSTEM_ROOT]/core/include/asset.inc Line: 3010

Message: Attribute "system_messages" not found for Asset "Intranet Login" (#21461) [SYS0092][/quote]



also on the front end it displays


[quote]addslashes()[/quote]



Have i missed something?


Can you pase the login_form MySource_AREA tag you're using?

Ahh I found what i did wrong. I had it just outside the login_form MySource_AREA tag. Moved it withing the tag and works fine. Thanks.