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
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
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.
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.
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.
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:
.
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.
Yes, but I did not understand the response.
Are you saying that I can use $_SESSION['admin_id'] and get the value?
Thanks,
BP
That's correct. Just asking for a clarification following the answer would have been sufficient.