Page 1 of 1

Fatal error when manual WordPress login

Posted: Tue Oct 10, 2023 2:10 pm
by benw
Hi Axe!

I'm getting a fatal error due to the "wp_w3all_phpbb_login" hook not being found.

PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "wp_w3all_phpbb_login" not found or invalid function name in C:\www\sgrt\wp-includes\class-wp-hook.php:310

This is happening when I'm logging in a user with the wp_signon() function (called via ajax).

You mention this error in a comment in:
wp-w3all-phpbb-integration\class.wp.w3all-phpbb.php
line 682

The hook action "wp_w3all_phpbb_login" is only referenced in one place:
wp-w3all-phpbb-integration\wp_w3all.php
line 665

Can you take a look please?

Thanks!

Re: Fatal error when manual WordPress login

Posted: Thu Oct 12, 2023 8:50 pm
by axew3
Hello! Just taking a look...

Re: Fatal error when manual WordPress login

Posted: Thu Oct 12, 2023 9:33 pm
by axew3
So that if you change into wp_w3all.php

Code: Select all

    add_action( 'wp_login', 'wp_w3all_phpbb_login', 10, 2);
into

Code: Select all

 if (function_exists('wp_w3all_phpbb_login')) {
    add_action( 'wp_login', 'wp_w3all_phpbb_login', 10, 2);
  }
that maybe you have try already, but if not, what it happen, the flow result to be ok and the user correctly logged?