Forums de discussion

Changing the error messages using hooks

thumbnail
ankit yakkundi, modifié il y a 13 années.

Changing the error messages using hooks

Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
Hi,

I am using hooks to login into liferay.

I want to know, how can i change the error messages through hooks in case we are not able to login.

Basically, i want to customize the messages of liferay using hooks.

Has anyone tried this? Any kind of ideas or suggestions would be of great help.

Thanks in advance.
thumbnail
jelmer kuperus, modifié il y a 13 années.

RE: Changing the error messages using hooks

Liferay Legend Publications: 1191 Date d'inscription: 10/03/10 Publications récentes
You need to create a language properties Hook for that. You can read more about this at

http://www.liferay.com/web/jonas.yuan/blog/-/blogs/hooks-and-plugin-ext-in-liferay-portal-6
thumbnail
ankit yakkundi, modifié il y a 13 années.

RE: Changing the error messages using hooks

Regular Member Publications: 221 Date d'inscription: 05/03/10 Publications récentes
Hi..
Thanks for the reply..
I am able to change the messages,but i have some doubts.
I am trying to authenticate and authorize the user against the LDAP.
I am able to change the Authenticate message but i want to know what i need to do to add message for authorization ie when the user is authenticated butnot authorized then i want to display an error message informing the user that he is not authorized..

Another problem which i am facing is that when a user leaves the email and password text boxes empty while login i want to show an error message that fields cant be empty.

So please help..
Any idea or suggestions are welcome..
Thanks in advance..