Automatically create user in an extranet [message #18076] |
Wed, 05 May 2004 16:22 |
anner
Messages: 36 Registered: May 2004
Karma: 0
|
Member |
|
|
I am trying to create a user in a client's extranet and create a FUD user at the same time. Then, when the user logs into the extranet and clicks on a link, they are to get logged into fud.
At the moment, if we create the user in FUD, the click to login works...the problem is creating the user when we create the user in the extranet. We can't post the same for FUD uses because we don't have the admin cookies set to do so. We have currently entered the users by doing:
$query = "insert into fud26_users (login, alias, passwd, name, email, join_date, last_read) values ('$login','$login',md5('$password'),'$name','$email','$datestamp','$datesta mp') ";
$sth=$dtools->query($dbh2,$query, 'Q1238');
$sth->finish;
#fetch the new user id
$query = "select id from fud26_users where login = '$login'";
$sth=$dtools->query($dbh2,$query);
($id)= $sth->fetchrow;
$sth->finish;
$query = "insert into fud26_group_members (user_id, group_id, group_members_opt) values ('$id','$group','3276951')";
$sth=$dtools->query($dbh2,$query);
$sth->finish;
When we try and login we get a "NO SUCH URL" error.
Please help ASAP, we were supposed to go live with this a couple of days ago. We've been struggling with it for a while.
Thanks,
Anne
|
|
|
Re: Automatically create user in an extranet [message #18082 is a reply to message #18076] |
Thu, 06 May 2004 12:20 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Don't create a user by running the queries manually, instead use the add_user() method of the fud_user_reg class defined inside users_reg.inc.
You can find usage examples inside scripts_common.inc file.
FUDforum Core Developer
|
|
|
|
|
|
|
|
|
|
Re: Automatically create user in an extranet [message #18919 is a reply to message #18076] |
Thu, 17 June 2004 01:47 |
|
I was reading this thread to see how someone can add a user to both an 'external' application and the FUDforum.
I see someone specified how to ADD a user via a class method, but how would you log this person on if they logon to the 'external' application first?
Thanks in advance,
------
zariok
|
|
|
|
|
|
|
Re: Automatically create user in an extranet [message #19591 is a reply to message #19585] |
Mon, 09 August 2004 10:14 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
When you login to the forum the forum creates you a session and stores it inside a cookie. Basically if the remote application does the same thing then forum can just pickup on the created cookie and use it.
FUDforum Core Developer
|
|
|