Customizing SMF > SMF Coding Discussion

Registering an account from outside of SMF

<< < (3/7) > >>

Labradoodle-360:
Check in the SMF Function Database, there might be a function that you can tie into (probably Subs-Members.php). I forget off the top of my head how SMF hashes passwords, it's not difficult.

Luis-:
I can't get it to work what so ever, here's my current code;

--- Code: --- $regOptions = array(
'interface' => 'guest',
'username' => $name,
'email' => null,
'password' => sha1(strtolower($name) . $pass),
'password_check' =>  sha1(strtolower($name) . $pass),
'check_reserved_name' => true,
'check_password_strength' => true,
'check_email_ban' => true,
'send_welcome_email' => false,
'require' => 'nothing',
'extra_register_vars' => array(),
'theme_vars' => array(),
);

registerMember($regOptions, true);

--- End code ---
Can you seen anything wrong with it?

Labradoodle-360:
Any errors in the log?

Luis-:
Yeah;

--- Code: ---The database value you're trying to insert does not exist: email_address
Function: registerMemberFile: /home/luis/public_html/forum/Sources/Subs-Members.php
Line: 584

--- End code ---

Labradoodle-360:
So should the variable in $regOptions be 'email_address', maybe? And you really should require an email...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version