Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Location
    Rochester, NY
    Posts
    231
    Plugin Contributions
    0

    Default How do I call the Username and Password of the current admin?

    How do I call the Username and Password of the current admin? For programming purposes, I just want to echo it using PHP or show it through a JavaScript alert. I will do other things with this later.

    What is the code to display them?

    Thanks,
    BP

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How do I call the Username and Password of the current admin?

    1. Passwords are NEVER available in PHP. They are encrypted with one-way encryption, and not extractable or unencryptable.
    2. The admin username is never stored in any variable. The admin_id is accessible in the $_SESSION, but if you need the name, you'll need to look it up from the database.

    "Why" you'd want to disclose that information to anyone is ... alarming.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2008
    Location
    Rochester, NY
    Posts
    231
    Plugin Contributions
    0

    Default Re: How do I call the Username and Password of the current admin?

    It's not to be disclosed. It's so I can build some extra functions into the admin panel. I need to know the username in order to do this so I can record it.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How do I call the Username and Password of the current admin?

    It would be simplest to use the admin number instead.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2008
    Location
    Rochester, NY
    Posts
    231
    Plugin Contributions
    0

    Default Re: How do I call the Username and Password of the current admin?

    Thanks! How would I call the Admin number?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How do I call the Username and Password of the current admin?

    Quote Originally Posted by bparker View Post
    Thanks! How would I call the Admin number?
    Um ... you've just asked the SAME question in FOUR places. That's considered poor etiquette as it floods the forum with disconnected questions, and is akin to spam.
    http://www.zen-cart.com/forum/showthread.php?t=137263
    http://www.zen-cart.com/forum/showthread.php?t=137265
    http://www.zen-cart.com/forum/showthread.php?t=137269

    Asking your question ONCE is sufficient, especially when it's already been answered for you previously:
    Quote Originally Posted by DrByte View Post
    2. ... The admin_id is accessible in the $_SESSION ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2008
    Location
    Rochester, NY
    Posts
    231
    Plugin Contributions
    0

    Default Re: How do I call the Username and Password of the current admin?

    Yes, but I did not understand the response.

    Are you saying that I can use $_SESSION['admin_id'] and get the value?

    Thanks,
    BP

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: How do I call the Username and Password of the current admin?

    That's correct. Just asking for a clarification following the answer would have been sufficient.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 18 Jun 2012, 09:59 AM
  2. Replies: 2
    Last Post: 19 Apr 2011, 02:28 PM
  3. how reset admin username and password?
    By alma1 in forum General Questions
    Replies: 5
    Last Post: 28 Dec 2010, 07:43 PM
  4. My admin: You entered the wrong username or password.
    By Dakar in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 23 Dec 2010, 03:35 PM
  5. can I have mroe than one Username and Password for the admin tool?
    By bparker in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Sep 2009, 03:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg