My goal is to:
Grab a query string (&ref) from the users url after they click agree to the terms.
Url ex.)
https://forum.com/ucp.php?mode=register&ref=person_who_ref_me
I used the event:
core.ucp_register_data_before
My code was inside my function in the listener:
Code: Select all
$ref = $request->variable('ref', '', false,\phpbb\request\request_interface::GET);
$request
like this in my listener file.Code: Select all
public function __construct(\phpbb\template\template $template,
\phpbb\controller\helper $helper,
\phpbb\user $user,
\phpbb\db\driver\driver_interface $db,
\phpbb\request\request $request)