Anybody have a problem with mgd_auth_midgard? Well its not a problem, but it seems I
have to log in twice to get it to authenticate. Anyone else have this issue, or is it
just me? Heres the basic page I have set up:
<?
if ($midgard->user){
$id = $midgard->user;
$user = mgd_get_person($id);
?>
Welcome Back &(user.name);
<form method=post><input type=hidden name=logout value="1"><input type=submit
value=" Logout "></form>
<?
} else {
?>
<FORM METHOD=post>
<b>Username:</b>
<br><INPUT TYPE=text name="username" class="input">
<br><b>Password:</b>
<br><INPUT TYPE=password name="password" class="input"><BR>
<INPUT TYPE="hidden" name="action" value="login"><br>
<input type="Submit">
</FORM>
<?
}
?>
In code-global I have:
<?
header ('Cache-Control: no-cache'); header ('Pragma: no-cache');
if ($action == "login"){
mgd_auth_midgard("$username+sitegroup","$password",1);
}
mgd_get_person($midgard->user);
if ($logout) {
$midgard->user = "";
mgd_auth_midgard("","",1);
}
?>
Any suggestions for avoiding the need for logging in twice while using
mgd_auth_midgard. (The first time you enter username and password, I get the login
form. If I relogin, everything works ok.
Thanks.
Drew
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]