I'm writing an integration plugin, how to set some $_SESSION vars after logging in?

Discussion in 'Integration' started by warriorpro, Dec 6, 2006.

  1. warriorpro

    warriorpro New Member

    Joined:
    Dec 4, 2006
    Messages:
    1
    Hi

    I'm writing an integration plugin with a 3rd party script and I'm having some troubles setting some $_SESSION vars after the user logs in through AMember

    the 3rd party script needs to check some $_SESSION in order to function correctly

    here's my after_login function
    PHP:
    function plugin_after_login($user)
        {
        global 
    $db$config$plugin_config;
        global 
    $HTTP_COOKIE_VARS$HTTP_SESSION_VARS;

        
    $this_config $plugin_config['protect']['plugin'];

        
    session_register('_amember_content_plugin_cookies_set');
        
    $profile plugin_get_profile($user[login]);
        
        
    $_SESSION['userid'] = $profile['userid'];
        
    $_SESSION['fullname'] = $profile['fullname'];
        
    $_SESSION['email'] = $profile['email'];
        
    $_SESSION['type'] = $profile['type'];
        }
    does anyone have some advice?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Code seems to be correct.

Share This Page