On Tue, 2002-10-15 at 01:37, Richard Smith wrote:
> Hi,
Greetings!
> I'm trying to create a small intranet site type thing where people
> request registration using their Novell NDS Login.
>
> I've got the thing collecting information from the Novell NDS fine...
> that works... But when I go to create the user (since midgard tracks
> authors and stuff I need to do it this way) using mgd_create_person
This sounds interesting. Would you be interested to share this
script once you get it finished?
> Subsequently my "registration" (if you can call it that) fails, since I
> then use the returned UID and create a midgard login and I don't want
> midgard complaining about that...
What user are you authenticated as when you try to create
the users? SG0 admin? Are you trying to create the users
to another sitegroup?
If I remember correctly, you need to do this in the
following way:
* Create the person object to SG0
* Create username for the person
* Move the person to target sitegroup
Here is example code from Nemein.Net Manager:
<?php
$adminusr=mgd_get_person();
$adminusr->firstname=$firstname;
$stat=$adminusr->create();
if($stat) {
$res=mgd_update_password_plain($stat,$username,$password);
if(!$res) {
$sg_message="<p>Problems with creating user account, reason
".mgd_errstr()."</p>\n";
}
$adminusr=mgd_get_person($stat);
$adminusr->setsitegroup($sg->id);
$adminusr=mgd_get_person($adminusr->id);
} else{
$sg_message=$sg_message."<p>Failed to create
user, reason ".mgd_errstr()."</p>\n";
} ?>
> - -- Richard - richard[at]gotworms.co.uk # telnet://www.tr3.org:3000 #
/Bergie
--
Henri Bergius [EMAIL PROTECTED]
Consultant Partner Tel: +358-20-198 6032
Nemein Oy http://www.nemein.com/
Nemein.Net - Project tracking solution for consulting companies
http://www.nemein.com/Nemein.Net/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]