phptest-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phptest-users] Login changes


From: Brandon Tallent
Subject: Re: [Phptest-users] Login changes
Date: Tue, 11 Feb 2003 13:19:41 -0800 (PST)

You could start by taking a look at cuser.inc.php. 
That's where all the authentication takes place.  For
this to work you would need to (obviously) have the
username and passwords match for both systems.  Once
your user is logged in to your courseware system, you
would use some phptest functions to login the user to
phptest:

    $user = new cUser;
    session_register('user');

    if (!$user->authenticate($username, $password)) {
        session_unregister('user');
        pt_redirect('index.php',
$user->error_message);
    } else {
        pt_redirect('index.php');
    }

You'll have to make sure you have all of the
neccessary phptest includes included in your
courseware login page.

Brandon






--- Luis Lebron <address@hidden> wrote:
> I would like to use phptest as part of an online
> course. However, I don't
> want to make the user login twice. Once to access
> the course materials and
> once to take the quizzes. I would the user to create
> all the neccesary
> variables when the user logs in to the main site so
> that when they go to
> take their test the system recognizes them and gives
> them the appropriate
> tests. Any ideas on how I can do this?
> 
> 
> thanks,
> 
> Luis R. Lebron
> Project Manager
> Sigmatech, Inc
> > _______________________________________________
> Phptest-users mailing list
> address@hidden
>
http://mail.nongnu.org/mailman/listinfo/phptest-users
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]