I really want to override the functionality of the OnSiginin function called in data-request="onSiginin" on the Login Forms. Where to do that ? and How to call the new function on the data-request ?
This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
You could do it via the page code like this
[account]
==
// This function takes priority over the components
function onSignin()
{
// Do custom logic here
return $this->account->onSignin();
}
==
...
Last updated
When I try to do this
$code = implode('!', [$user->id, $user->getResetPasswordCode()]);
$link = $this->controller->currentPageUrl([
$this->property('paramCode') => $code
]);
in '// Do custom logic here' below
[account]
==
// This function takes priority over the components
function onSignin()
{
// Do custom logic here
return $this->account->onSignin();
}
==
...
I get an error
"call_user_func_array() expects parameter 1 to be a valid callback, class 'Cms\Classes\Controller' does not have a method 'property'" on line 112 of /home/vagrant/Code/octobercms/modules/cms/Classes/CodeBase.php
It looks like property() method isn't available in this new overriding function.
Why is that?
1-8 of 8