Extending the User Registeration process in 5.7
Permalink
I've just started to build a standalone site and want to extend the user registration process so I can store additional user info in a seperate table other than the UserSearchIndexAttributes table. What I've done so far is:
1. created register.php at /application/controllers/single_pages. Contents of this file are
2. Registered an event in /application/app.php like so:
I've tested the register.php file I created to make sure it's being used by putting a die() in the on_start and do_register methods which did behave as expected.
Now this is the error I'm receiving:
Admittedly I'm new to this whole namespacing but it's starting to make a lot of sense. What am i doing wrong here? Or how best can achieve what I'm trying to achieve?
1. created register.php at /application/controllers/single_pages. Contents of this file are
namespace Application\Controller\SinglePage; class Register extends \Concrete\Controller\SinglePage\Register { public function processNewUser() { // Do Processing } }
2. Registered an event in /application/app.php like so:
use Application\Controller\SinglePage\Register as Register; $register = new Register(); Events::addListener('on_user_add', array($register, 'processNewUser'));
I've tested the register.php file I created to make sure it's being used by putting a die() in the on_start and do_register methods which did behave as expected.
Now this is the error I'm receiving:
Argument 1 passed to Concrete\Core\Page\Controller\PageController::__construct() must be an instance of Concrete\Core\Page\Page, none given...
Admittedly I'm new to this whole namespacing but it's starting to make a lot of sense. What am i doing wrong here? Or how best can achieve what I'm trying to achieve?