Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7610571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:26:58+00:00 2026-05-31T01:26:58+00:00

How can I log in user from page header without making my own login

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:27:00+00:00Added an answer on May 31, 2026 at 1:27 am

    From Liferay’s 7cogs theme

    <form action="/web/guest/home" method="post" name="loginadmin">
        <input name="p_p_id" type="hidden" value="58">
        <input name="p_p_lifecycle" type="hidden" value="1">
        <input name="p_p_mode" type="hidden" value="view">
        <input name="p_p_state" type="hidden" value="maximized">
        <input name="_58_struts_action" type="hidden" value="/login/login">
        <input name="_58_login" type="hidden" value="bruno@7cogs.com">
        <input name="_58_password" type="hidden" value="bruno">
        ...
        <a class="express_login" href="#" onclick="document.loginadmin.submit();return false;">Login as Bruno.</a>
        ...
    </form>
    

    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

    <form action="/en_GB/web/guest/home" method="post" name="loginadmin">
    

    Notice the added locale (/en_GB). In your case probably is different but change it with your value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I have a login page were the user can log in.
If a user tries to log in and the login fails the page should
So I have a home page where a user can log in. Once they
In our client/server application, a user can log in using a username/password. The server
I am using sessions to pass user information from one page to another. However,
I have a login form in every page of a website so the user
I am making a website where a user can create an account and then
I have an aspx page, which is a User Log-In area. I want to
I've got to put a login page from a 3rd party website in an
How can I prevent a user from neglecting the normal work flow of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.