> <!-- page content -->
> <form action="&(midgard.uri);" method=post>
> <input type=text name=name>
> <input type=text name=password>
> ... other input fields ...
> <input type=submit>
> </form>
> 
> <?
> if($name && $password)
> {
>   $group_id=mgd_get_group_by_name("guests");
>   mgd_auth_midgard($admin_name,$admin_pwd);
>   if($pid=mgd_create_person($firstname, $lastname, $birthdate, $street,
> $postcode, $city, $handphone, $homephone, $workphone, $homepage, $email,
> $topic, $department, $office, $extra))  // all parameters passed by form
>   {
>     mgd_update_password($pid,$name,$password);
>     mgd_create_member($pid,$group_id,"");
>   }
>   mgd_auth_midgard($name,$password);
> }
> ?>
> <!-- /page content -->
> 
> !!!!! you may want to put set_cookie('MidgardLogin'); at the very beginning
> of the code-global page element to erase the cookie set by mgd_auth_midgard
> (mine doesn't seem to set any cookie so I can't check this).

Perfect! The set_cookie is *not* *optional* BTW, as people will
otherwise
automatically be logged in as admin.

Emile

--
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]

Reply via email to