Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: [Joni] on August 07, 2008, 01:49:45 PM

Title: ssi_registerMember function
Post by: [Joni] on August 07, 2008, 01:49:45 PM
i created a function called ssi_registerMember which is an addon for SSI.php , the function can be used for registring members with costum forms...

function ssi_registerMember($username,$password,$password_check,$email) {
global $sourcedir;
include($sourcedir.'/Subs-Members.php');
$regOptions = array(
'username' => "$username",
'password' => "$password",
'password_check' => "$password_check",
'email' => "$email");
registerMember($regOptions);
}


call the function like this ->
ssi_registerMember($username,$password,$password_check,$email);
where $username = $_REQUEST['username']; ect.
i'm sorry if i'm in the wrong section  :-[
Title: Re: ssi_registerMember function
Post by: ExcalibursZone on August 08, 2008, 10:56:11 AM
Well, it will help a lot of integrators, good work!

Though, I use custom forms to log in all the time, I just post to index.php?action=login2 and I set the page I want to redirect directly in the $_SESSION. It looks like your method will work as well!