How can I log in user from page header without making my own login portlet and without redirecting to login page (maybe via javascript or something else)? I have two input fields in header – for username and password and I dont’t want extra login page.
Share
From Liferay’s 7cogs theme
So either use this form, in your header, but instead of having hidden fields for “_58_login” and “_58_password” use text/password inputs (that you already have, but change names to be “_58_login” and “_58_password”), or populate those hidden fields with values from your header fields with javascript and submit this (shown above) form.
Testing this (Liferay 6.1) I had to modify, to make it work, form action to be
Notice the added locale (/en_GB). In your case probably is different but change it with your value.