Title: undefined function login_header
Last modified: September 11, 2020

---

# undefined function login_header

 *  Resolved [stclair65](https://wordpress.org/support/users/stclair65/)
 * (@stclair65)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/undefined-function-login_header/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fundefined-function-login_header%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/undefined-function-login_header/#post-13392444)
 * Hi [@stclair65](https://wordpress.org/support/users/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="http://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](https://wordpress.org/support/users/ashleypearceihr/)
 * (@ashleypearceihr)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/undefined-function-login_header/#post-13638304)
 * Hey – to be perfectly clear, where are we inserting this code? Functions.php?
   
   I have the exact same issue
 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/undefined-function-login_header/#post-13638918)
 * Hi [@ashleypearceihr](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/new-user-approve/assets/icon-128x128.gif?rev=2544141)
 * [New User Approve](https://wordpress.org/plugins/new-user-approve/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/new-user-approve/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/new-user-approve/)
 * [Active Topics](https://wordpress.org/support/plugin/new-user-approve/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/new-user-approve/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/new-user-approve/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/undefined-function-login_header/#post-13638918)
 * Status: resolved