• Resolved stclair65

    (@stclair65)


    When a new user attempts to register, they receive a fatal error message. However, the account is created and the rest of the registration process appears to work.

    I’ve replaced actual domain, usernames and email address with generics in the log below.
    The log indicates:
    Fatal error: Uncaught Error: Call to undefined function login_header() in /home/customer/www/websitename.com/public_html/wp-content/plugins/new-user-approve/new-user-approve.php:737 Stack trace: #0 /home/customer/www/websitename.com/public_html/wp-includes/class-wp-hook.php(289): pw_new_user_approve->show_user_pending_message(Object(WP_Error)) #1 /home/customer/www/ websitename.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Object(WP_Error), Array) #2 /home/customer/www/ websitename.com/public_html/wp-includes/user.php(2555): apply_filters(‘registration_er…’, Object(WP_Error), ‘username, ‘name@domain…’) #3 /home/customer/www/websitename.com/public_html/wp-content/plugins/wpforo/wpf-includes/class-members.php(262): register_new_user(‘username, ‘name@domain…’) #4 /home/customer/www/ websitename.com/public_html/wp-content/plugins/wpforo/wpf-includes/class-actions.php(349): wpForoMember->create(Array) #5 /home/customer/www/avolveso in /home/customer/www/ websitename.com/public_html/wp-content/plugins/new-user-approve/new-user-approve.php on line 737

    The site is running WordPress 5.5.1 running Twenty Sixteen theme.
    Plugins include:
    wpForo 1.8.4
    Ultimate Member 2.1.8
    New User Approve 1.8.1
    WordPress Starter 1.1.1
    Colorlib Login Customizer 1.2.96
    EmbedPress 2.6.0
    ManageWP – Worker 4.9.7
    SG Optimizer 5.6.5
    WP Statistics 12.6.13

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @stclair65,

    Thanks for using New User Approve,

    Please add a redirect field by using the below action hook.
    if the redirect field is added then the code which is causing the fatal error will be bypassed.

    
    add_action('wpforo_register_form_end', 'nua_registeration_add_redirect_field');
    function nua_registeration_add_redirect_field(){?>
    
    <input type="hidden" name="redirect_to" value="https://www.yourexamplewebsite.com/members/">
    <?php
    }
    

    Please enter your desired URL in the value attribute so the registered users will be redirected to the provided URL.

    Thanks!

    Ashley

    (@ashleypearceihr)

    Hey – to be perfectly clear, where are we inserting this code? Functions.php?
    I have the exact same issue

    wpexpertssupportteam

    (@wpexpertssupportteam)

    Hi @ashleypearceihr,

    Yes, You need to add the above-shared code in the functions.php file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘undefined function login_header’ is closed to new replies.