Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    18
    Plugin Contributions
    0

    help question External Log In - Log a Customer in from another system

    Hi I have a website that currently has 3 systems these are,

    My own Log In / User Authentication System

    A PHPBB Forum

    A Zen Cart Shop

    What I need To Do
    Have A Customer Logged in from a form in my own log in system, so they do not need to log in twice and for ease of use.

    Current Situation
    Basically I have set it up so that when a user registers at my site, a user is created for them in the forum and a customer is created in zen cart. Now I need to log the user into Zen Cart when they log in using the form on my website. Getting PHPBB to work was no problem, I found a class and now when a user logs into the website they are also logged into PHPBB. And when they log out of the site, they are logged out of phpbb.

    I have modified phpbb so that the log in link takes them to my log in form and the log out command is going to my log out system. I intend to do the same with Zen Cart but so far I have found it impossible, I cannot find any support for this any where so I am asking here.

    Please someone give me a hand let me know which file it is that makes the user logged in as I cannot find anything, or what function is run, or even what session data is created so that I can duplicate this with my own log in system and then I will be very happy indeed.

    Cheers

  2. #2
    Join Date
    Jul 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: External Log In - Log a Customer in from another system

    hey can anyone just help me to show me where in the zen cart application a log in is processed? thanks

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

    Default Re: External Log In - Log a Customer in from another system

    /includes/modules/pages/login/header_php.php
    similar for logout
    .

    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.

  4. #4
    Join Date
    Jul 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: External Log In - Log a Customer in from another system

    Thanks very much I am no able to process a customer log in hopefully, I will update my post above when I am done so that other people can find this thread useful. Thanks DrByte!

  5. #5
    Join Date
    Jul 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: External Log In - Log a Customer in from another system

    Quote Originally Posted by DrByte View Post
    /includes/modules/pages/login/header_php.php
    similar for logout
    I've done a var_dump on the $_SESSION super global and it has opened some more questions,

    Contents of the dump

    array(18) {
    ["customers_host_address"]=> string(29) "XXXXXXXXX.XXX.XX"
    ["cartID"]=> string(0) ""
    ["cart"]=> &object(shoppingcart)(8)
    {
    ["observers"]=> array(0) { }
    ["contents"]=> array(0) { }
    ["total"]=> int(0) ["weight"]=> int(0)
    ["content_type"]=> bool(false) ["free_shipping_item"]=> int(0) ["free_shipping_weight"]=> int(0)
    ["free_shipping_price"]=> int(0) }
    ["navigation"]=> &object(navigationhistory)(3) {
    ["observers"]=> array(0) { }
    ["path"]=> array(1) { [0]=> array(4) {
    ["page"]=> string(5) "login"
    ["mode"]=> string(6) "NONSSL"
    ["get"]=> array(1) { ["action"]=> string(7) "process" }
    ["post"]=> array(0) { }
    }
    }
    ["snapshot"]=> array(0) { }
    }
    ["check_valid"]=> string(4) "true"
    ["language"]=> string(7) "english"
    ["languages_id"]=> string(1) "1"
    ["languages_code"]=> string(2) "en"
    ["currency"]=> string(3) "GBP"
    ["updateExpirations"]=> bool(true)
    ["session_counter"]=> bool(true)
    ["customers_ip_address"]=> string(14) "XXX.XXX.XXX.XX"
    ["customer_id"]=> string(1) "3"
    ["customer_default_address_id"]=> string(1) "3" ["customers_authorization"]=> string(1) "0"
    ["customer_first_name"]=> string(3) "Tom"
    ["customer_country_id"]=> string(3) "222"
    ["customer_zone_id"]=> string(3) "190"
    }

    Question being do I need to set all these session values or just the ones starting customers_ in order for a login to be "correct" in terms of the application being ok with it?

    Thanks very much for any help

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

    Default Re: External Log In - Log a Customer in from another system

    Quote Originally Posted by designerman View Post
    Question being do I need to set all these session values or just the ones starting customers_ in order for a login to be "correct" in terms of the application being ok with it?
    Just refer to the code in the login header_php.php file for the specifics of what gets set during a successful login.
    .

    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
    Jul 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: External Log In - Log a Customer in from another system

    I set the session data and update the customer_info table with the same query but when I visit the shop it does not appear as logged in, what am I missing?

 

 

Similar Threads

  1. Replies: 1
    Last Post: 3 Feb 2015, 10:22 PM
  2. How can I log a customer out if they go to another site?
    By raunharman in forum General Questions
    Replies: 1
    Last Post: 2 Sep 2009, 11:57 PM
  3. Problem with Customer Log in/ Log out
    By tequila in forum General Questions
    Replies: 11
    Last Post: 3 Jul 2009, 02:39 AM
  4. Moving Site from one host to another. Can't log into admin
    By dinki in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 6 Mar 2009, 07:37 PM
  5. Log in and Log out from main page
    By gardengate in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 7 Sep 2006, 06:07 PM

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