Third Party Integration

Discussion in 'Integration' started by chemistry2004, Jun 29, 2012.

  1. chemistry2004

    chemistry2004 Member

    Joined:
    Jan 26, 2007
    Messages:
    78
    Basically I am integrating amember with web tutoring. There are two logged in users from two different products but pointing to same php file, one as meeting moderator and another as attendee. How can I, as moderator, can see and retrieve logged in attendee information. I need this to create personalized meeting name and welcome message etc.

    I did something like this and got struck afterwards

    Code:
    $_product_id = array(1,2);
    require_once 'var/www/amember/plugins/protect/php_include/check.inc.php';
    $user = $_SESSION['_amember_user'];
            if ($user['member_id'] > 0){
            $valid = array_intersect($_product_id, $_SESSION['_amember_product_ids']);
                    if (in_array("1", $valid)){
                            $user_role = "Tutor";
                    }
                    else {
                            $user_role = "Student";
                    }
            }
    $myMeetingID="Meeting Name";
    
    I want the Meeting Name as name of the Student role irrespective of who joins as Tutor

    regards,
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    So, you want to get info about user who is logged in and try to access the same file at the same time?
    aMember do not store logged in user's info. Only you get your own info from session, there is no way to get info about other logged in user. To make this happen you have to store that info in database for each session, and then query database instead of php session.

Share This Page