Thread: Username

Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2007
    Posts
    54
    Plugin Contributions
    0

    Default Username

    I would like to know where to find the variable name or the define statement for a given username after the user logs in. I need to know this because I want to enter information in a second database and I want to use that username as a key in a number of tables. I also need to know it for other things in the site that require the user to be logged in.

    In the admin panel there is Tools/Developer Tool Kit, but that will let me find out the value of a particular define. I don't know what that is for the username. Also, is there anywhere to find out what the the values are for ALL the defines?

    Zen Cart seems to do just about everything with define statements. is there a way of seeing what all the global/session variables are?

    Traversing the file structure has been a nightmare.

  2. #2
    Join Date
    Jun 2005
    Location
    Cheney WA
    Posts
    1,134
    Plugin Contributions
    0

    Default Re: Username

    Oh, nevermind. I shouldn't be answering questions this early in the morning. More coffee please.

  3. #3
    Join Date
    Oct 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Username

    If you have an answer, it would be greatly appreciated -- coffee or not.

  4. #4
    Join Date
    Jun 2005
    Location
    Cheney WA
    Posts
    1,134
    Plugin Contributions
    0

    Default Re: Username

    No no, Ii don't have the answer. I wasn't trying to tease you or anything. I started to send you the the admin but then read further and realized that the answer was a abit more technical than I could provide.

    coffee or not.

  5. #5
    Join Date
    Oct 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Username

    Though I still want the answer to my question, I think I can do the job with $_SESSION['customer_id']; The way I see it, if this is set then the user is logged in. I can add a field to my tables called zc_customer_id and set that field with the value of $_SESSION['customer_id']. I don't really need the name or email in other parts of the site, just an identifier for a hook to a bunch of other tables. The customer_id is unique in zen cart, and that is what I really should be using anyway.

    My general question though, about finding all the globals, still stands.

  6. #6
    Join Date
    Jun 2005
    Location
    Cheney WA
    Posts
    1,134
    Plugin Contributions
    0

    Default Re: Username

    I searched the wiki with globals and pulled this up.

    http://www.zen-cart.com/wiki/index.p...search=globals

    Can't you simply search the code with notepad++ and find all the globals that way?

  7. #7
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Username

    There is a superglobals contribution in the downloads area that you can use if you want to get a quick view of inner vars details.
    .

    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.

  8. #8
    Join Date
    Oct 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Username

    Quote Originally Posted by birdoasis View Post
    I searched the wiki with globals and pulled this up.

    http://www.zen-cart.com/wiki/index.p...search=globals

    Can't you simply search the code with notepad++ and find all the globals that way?
    What does one look for? If you look for "username", then you find a massive list under the tree from the root of the Zen Cart Installation. It would be very nice if one could simply see a list of all the globals and all the defines.:

 

 

Similar Threads

  1. v153 Username
    By pageblair in forum General Questions
    Replies: 0
    Last Post: 8 Sep 2014, 11:57 PM
  2. Admin Username
    By rocketrod in forum General Questions
    Replies: 3
    Last Post: 16 Jul 2010, 09:35 AM
  3. Admin Username
    By dd99 in forum General Questions
    Replies: 2
    Last Post: 9 May 2010, 12:46 PM
  4. Lost Username
    By Iktomi in forum General Questions
    Replies: 3
    Last Post: 12 Jun 2008, 05:31 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR