XF 2.0 Script to add users

dwooding

Member
I have been away and I come back and noticed there is now a RESTful API ... who knew :)

I have a script pre-2.1 that adds / removes users from Xenforo.

The script does the following for a new user:

(1) Register
(2) Edit the user
... some other stuff

The Edit the user part includes adding / modifying the secondary user group.

All good.

Now I have done the following.

In the ACP > Setup > Options > User registration > New user welcome: Start welcome conversation on registration

My script still works - user is created, welcome message is sent, except, the secondary user group is not set.

Seems to be a conflict between generating the welcome conversation and the user edit.

I put a 5 second sleep between the register and edit step - no luck (but it might not have actually slept for 5 seconds - that is another issue).

Any ideas on what might be causing issues?

Thanks,

Dave
 
Top Bottom