Adding a new page to the user registration process


The Elgg 1.8.19 has the following flow for user registration.
(1) A new user submits the registration form.
(2) The user is forwarded back to the login page, and some messages appear in the upper right corner.

I would like to change the process to
(1) A new user submits the registration form.
(2) The user is forwarded to a new page, and some messages appear in the upper right corner on the new page.

How do I create the new page?  How do I integrate the new page into the existing workflow?


  • The purpose of doing this is hiding the login form from the human user.  The "new page" just display any queued Elgg messages and forward the human user to another website.

    Is there a better way to achieve my goal?

  • You have to register a pagehandler for your intermediates pages first. Then you can follow any of the method below.

    1. Unregister the registration action and register a new action file with necessary changes to redirect the user to the intermediate page after registration.
    2. Using a plugin hook, hook into the forward() and redirect the user as needed.

    These links will be helpful for you

  • The 2nd method looks easier.

    Do you mean that I can create a regular plugin (in <Elgg root dir>/mod/<my plugin>) and then hook it to the Elgg core to change the work flow of user registration?

  • After looking into the start.php of Plugin "uservalidationbyemail", I am clearer about the procedure for hooking a plugin to the core.

    My plugin only has 2 files, "manifest.xml" and "start.php".

    The start.php of my plugin should contain


    elgg_register_event_handler('init', 'system', '<my plugin name>_init');

    function <my plugin name>_init() {

    elgg_register_page_handler('<page type to handle>', '<my plugin name>_page_handler');

    elgg_register_plugin_hook_handler('register', 'user', '<my plugin name>_hook_handler');


    function <my plugin name>_page_handler() {

    /* empty function.  this is a blank page which just displays all queued Elgg messages.  */


    function <my plugin name>_hook_handler() {

    forward('<the url for another site>');



    Is my design correct?

    What should the <page type to handle> be?

    When does the engine calls the hook handler?  The "List of plugin hooks in core" does not explain when the hook handler is called relative to the registration operation.