XF 1.1 Run SQL Query on registration

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).
For the datawriter, look at the _postSave() function. You can use code like this:

if ($this->isInsert())
	$db->query("SQL HERE");

Fairly simple. You can modify the file or create an addon to extend the class.
Top Bottom