Using Moodle Sessions for Authentication

Using Moodle Sessions for Authentication

by James Ballard -
Number of replies: 1
Hi

I am trying to incorporate MRBS into Moodle so that only a single sign-on is required and admin levels are based on those from Moodle. Currently the session is authenticated via the following, which is based on NT users:

function authGet() { }

function getUserName()
{
    global $AUTH_USER;
    $AUTH_USER = get_current_user(); 
    return $AUTH_USER;

}

Is there an easy way to set this so that a logged in Moodle user is the authorised user ($AUTH_USER).

Yours
James
Average of ratings: -
In reply to James Ballard

Re: Using Moodle Sessions for Authentication

by James Ballard -
Solved using:

function getUserName()
{
    global $AUTH_USER, $USER;
    $AUTH_USER = $USER->username; 
    return $AUTH_USER;

}