Advertisement:

Author Topic: Registering an account from outside of SMF  (Read 3897 times)

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,588
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Registering an account from outside of SMF
« Reply #20 on: May 10, 2012, 01:15:31 PM »
That's fine, I got it. I'll clean it up a little and return a PM.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline Luis-

  • Beta Tester
  • Semi-Newbie
  • *
  • Posts: 89
  • Gender: Male
Re: Registering an account from outside of SMF
« Reply #21 on: May 11, 2012, 11:03:09 AM »
Labradoodle, did you manage to find out what was wrong with this?

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,588
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Registering an account from outside of SMF
« Reply #22 on: May 11, 2012, 12:18:39 PM »
No, as I said on MSN, I don't really have the time. I'd have to spend some time debugging it locally.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline Luis-

  • Beta Tester
  • Semi-Newbie
  • *
  • Posts: 89
  • Gender: Male
Re: Registering an account from outside of SMF
« Reply #23 on: May 11, 2012, 05:31:21 PM »
Ah, sorry. I must have read it wrong, I thought you meant you'd do it.
« Last Edit: May 11, 2012, 05:50:39 PM by Luis- »

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,588
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Registering an account from outside of SMF
« Reply #24 on: May 11, 2012, 05:40:04 PM »
I truly wish I could, I have *way* too much on my plate as it is. Sorry

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Online emanuele

  • Developer
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
  • Because Orange is Orange
Re: Registering an account from outside of SMF
« Reply #25 on: May 11, 2012, 05:44:44 PM »
I can't get it to work what so ever, here's my current code;
Code: [Select]
$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);
Can you seen anything wrong with it?
Yes: email is null.
It must be a "valid" email (i.e. something that resembles an email).

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Luis-

  • Beta Tester
  • Semi-Newbie
  • *
  • Posts: 89
  • Gender: Male
Re: Registering an account from outside of SMF
« Reply #26 on: May 12, 2012, 09:54:54 AM »
I changed that after, to see if it made a difference but it didn't. It still wont work.

Online emanuele

  • Developer
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
  • Because Orange is Orange
Re: Registering an account from outside of SMF
« Reply #27 on: May 13, 2012, 09:10:23 AM »
And what error do you get?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Luis-

  • Beta Tester
  • Semi-Newbie
  • *
  • Posts: 89
  • Gender: Male
Re: Registering an account from outside of SMF
« Reply #28 on: May 13, 2012, 10:36:40 AM »
There are no errors in my error log.

Online emanuele

  • Developer
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
  • Because Orange is Orange
Re: Registering an account from outside of SMF
« Reply #29 on: May 13, 2012, 11:13:03 AM »
Do you put something in $user_info['is_guest']?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Luis-

  • Beta Tester
  • Semi-Newbie
  • *
  • Posts: 89
  • Gender: Male
Re: Registering an account from outside of SMF
« Reply #30 on: May 13, 2012, 08:05:08 PM »
I don't have that in my code.

Online emanuele

  • Developer
  • SMF Super Hero
  • *
  • Posts: 12,154
  • Gender: Male
  • Because Orange is Orange
Re: Registering an account from outside of SMF
« Reply #31 on: May 14, 2012, 05:13:55 AM »
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: [Select]
global $user_info;
$user_info['is_guest'] = 1;

registerMember($regOptions, true);
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']. ;)

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.