Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Basic Configuration / How do I call the Username and Password of the current admin?

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

Locked

Started by bparker on 16 Sep 2009, 7:30 PM · Views: 3,886

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
16 Sep 2009, 7:30 PM
#1
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Post #1 by bparker

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

16 Sep 2009, 7:38 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

  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.

16 Sep 2009, 7:58 PM
#3
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Post #3 by bparker

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.

16 Sep 2009, 8:04 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

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.

17 Sep 2009, 2:17 AM
#5
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Post #5 by bparker

Thanks! How would I call the Admin number?

17 Sep 2009, 11:29 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

bparker:

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:

DrByte:

  1. ... 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.

17 Sep 2009, 4:08 PM
#7
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Post #7 by bparker

Yes, but I did not understand the response.

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

Thanks,
BP