]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Yoink the registration action
authorEvan Prodromou <evan@status.net>
Sun, 17 Apr 2011 22:27:25 +0000 (18:27 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 17 Apr 2011 22:27:25 +0000 (18:27 -0400)
plugins/EmailRegistration/EmailRegistrationPlugin.php

index 3d868da69f58582b7f7cca1340b9744db1fb90de..e23cb6dc34e93f7b7324699ff5b9f402d313eb1a 100644 (file)
@@ -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;
     }