Jump to content
marco2308

Missing actionAuthenticationBefore hook PS 1.7.6.0

Recommended Posts

Hello!

I just installed Prestashop 1.7.6.0 (localhost installation), just an empty brand new installation of Prestashop, with no modules or 3d part themes installed,

I wrote my own module to override Prestashop login.

my module simply declare an hook on its own install function:

$this->registerHook('actionAuthenticationBefore') 

and manage my own code through the function hookActionAuthenticationBefore() in my module.

the hook 'actionAuthenticationBefore' is listed in official PS documentation https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

and it is executed in CustomerLoginForm class (in submit() function)

the problem is that when the hook is executed (Hook::exec('actionAuthenticationBefore')) return false because there is no record with name 'actionAuthenticationBefore' in ps_hook table in db.

Is this a bug ? I can't figured out why this hook should not be in that table, it should be officially part of prestashop hooks and there is an alias declared in hook_alias table.

Can anyone help me to report this bug?

 

Edited by marco2308 (see edit history)

Share this post


Link to post
Share on other sites
On 9/24/2019 at 12:54 PM, marco2308 said:

Hello!

I just installed Prestashop 1.7.6.0 (localhost installation), just an empty brand new installation of Prestashop, with no modules or 3d part themes installed,

I wrote my own module to override Prestashop login.

my module simply declare an hook on its own install function:

$this->registerHook('actionAuthenticationBefore') 

and manage my own code through the function hookActionAuthenticationBefore() in my module.

the hook 'actionAuthenticationBefore' is listed in official PS documentation https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

and it is executed in CustomerLoginForm class (in submit() function)

the problem is that when the hook is executed (Hook::exec('actionAuthenticationBefore')) return false because there is no record with name 'actionAuthenticationBefore' in ps_hook table in db.

Is this a bug ? I can't figured out why this hook should not be in that table, it should be officially part of prestashop hooks and there is an alias declared in hook_alias table.

Can anyone help me to report this bug?

 

Hi, I have encountered the same problem. Looking at the hook table the name seems to be actionbeforeauthentication. I hope it helps!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More