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 6471941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:17:00+00:00 2026-05-25T06:17:00+00:00

We maintain a website built on LAMP stack that allows members to log into

  • 0

We maintain a website built on LAMP stack that allows members to log into their profile. While we have an admin interface to handle most tasks, there are times it is ‘necessary’ to log in “as” the member and see what they are seeing.

We have a very secure and thorough salting and verification login process for members but my thought is the following statement is not too secure:

sql = SELECT * FROM userlogins WHERE username = :user

(run the users entered password through the salt process)
$userpasswordentered = undisclosed salt process of ($_POST['password']);

if($userpasswordentered == value retrieved from userlogins above OR $_POST['password'] == 'hardcodedpw') {

    log user in
}

Is there a real ‘safe’ way to create a ‘super’ password that would allow me to log into any user account given a valid username was given?

  • 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-25T06:17:01+00:00Added an answer on May 25, 2026 at 6:17 am

    I would implement some sort of “user impersonation” feature. So basically, from your admin account, you can enter / search for a user ID, and then call the “log user in” code as if that user had logged in. This will log the admin user out, but they will now be impersonating the customer as requested.

    Personally though, if I have a user/edit action, then the code does the following:

    //check for an admin user
    if ($current_user->role == 'admin')
        //admins have to specify customers to edit
        if (isset($_GET['id']))
            $user_id = $_GET['id'];
        else
            //if no customer is specified, return a 404
            http_404();
    else
        //customers can only see their own details
        $user_id = $current_user->id;
    
    //get the user details to edit
    $user_to_edit = $repository->get_user($user_id);
    

    That way, the admin user gets to stay logged in, and you get to control how much of the customer’s stuff the admin user can mess with.

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

Sidebar

Related Questions

So I have been asked to help maintain a website that uses Ruby on
I have an ASP.NET website that I built that has grown considerably in size
I have a website that I would like to embed a blog into. I
I have inherited an asp.net website to maintain when looking at the aspx page,
I have been asked to update the menu on a website we maintain. The
I have a website that needs to perform a certain backend function once per
I have inherited a large existing website to maintain. Previous developers have taken an
I maintain a moderate sized public internet website for a company built using C#
I maintain an ASP.NET MVC website that uses FormsAuthentication.SetAuthCookie(userName, createPersistentCookie); to sign users in
A website I maintain pro-bono was hacked, dishing out 302s to gaming sites, etc.

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.