• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Activating user accounts from 3rd party script..

#1
I was browsing about trying to understand the code on how I would achieve this, unfortunatly, OOP and Classes are beyond me.

I run a game server, and i have a plugin so a user can activate thier forum account IN GAME, rather than email (since anyone can create 10000 email accounts), I was looking to find out what actually happens when an account is activated.

I know it needs to be removed from xf_user_confirmation, but from what I could tell, the usergroup didnt change in the user table.

I would generally set it to manual approval, so the script could do what it needs to in the back end.

Thanks for your help
 

Jake Bunce

XenForo moderator
Staff member
#2
To manually activate a user account (like a user clicking the email activation link) you need to do the following:

1) Delete the associated record from xf_user_confirmation.

2) Update xf_user.user_state for that user.

The code is in this file if you are curious:

library/XenForo/ControllerPublic/AccountConfirmation.php

See the first function called actionEmail().