XF 1.1 Run SQL Query on registration

Jake Bunce

XenForo moderator
Staff member
#2
You will need an addon that extends either XenForo_ControllerPublic_Register or XenForo_DataWriter_User. The datawriter might be more appropriate, that way you can execute your code on all user inserts (registration, Admin CP).
 

Jake Bunce

XenForo moderator
Staff member
#3
For the datawriter, look at the _postSave() function. You can use code like this:

Code:
if ($this->isInsert())
{
	$db->query("SQL HERE");
}
Fairly simple. You can modify the file or create an addon to extend the class.
 
Top