Customizing SMF > SMF Coding Discussion

Registering an account from outside of SMF

<< < (7/7)

Luis-:
I don't have that in my code.

emanuele:
One of the first things that registerMember does is to check if $user_info['is_guest'] is empty or not.
If it is empty it redirectexit().
Why? Because if you are not a guest (i.e. empty($user_info['is_guest'])) then you are not supposed to register again.

So you can try:

--- Code: ---global $user_info;
$user_info['is_guest'] = 1;

registerMember($regOptions, true);
--- End code ---
And if you have any way to know if it is really a guest or not, then use this check to populate $user_info['is_guest']. ;)

Navigation

[0] Message Index

[*] Previous page

Go to full version