We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 45b0c5ef authored by Evan Prodromou's avatar Evan Prodromou

Yoink the registration action

parent 064ed694
......@@ -62,26 +62,12 @@ class EmailRegistrationPlugin extends Plugin
}
}
/**
* Hijack main/register
*/
function onStartConnectPath(&$path, &$defaults, &$rules, &$result)
function onArgsInitialize(&$args)
{
static $toblock = array('main/register', 'main/register/:code');
if (in_array($path, $toblock) && $defaults['action'] != 'emailregister') {
return false;
if (array_key_exists('action', $args) && $args['action'] == 'register') {
// YOINK!
$args['action'] = 'emailregister';
}
return true;
}
function onStartInitializeRouter($m)
{
$m->connect('main/register', array('action' => 'emailregister'));
$m->connect('main/register/:code', array('action' => 'emailregister'));
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment