Fatal error when manual WordPress login

benw
User w
User w
Posts: 9
Joined: Thu Feb 24, 2022 3:34 pm

Fatal error when manual WordPress login

Post 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!
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Fatal error when manual WordPress login

Post by axew3 »

Hello! Just taking a look...
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Fatal error when manual WordPress login

Post 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?
Post Reply