Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Registration Hooks don’t appear to be working

Use the Gravity forms gform_user_registered hook. It fires after the registration and will return the $user_id.

function my_auto_login( $user_id ) {
wp_set_auth_cookie( $user_id, false, is_ssl() );
wp_redirect( admin_url( 'profile.php' ) );
exit;
}

add_action( 'gform_user_registered', 'my_auto_login' );

Related Posts:

  1. How can I tell if I’m on a login page? [duplicate]
  2. How to override WordPress registration and insert an auto-generated username?
  3. Remove default user registration, login and subscriber profiles
  4. How can I get my Script to work on the Login page?
  5. Get User Login Data (date, time… )
  6. Unable to login after registration
  7. Redirecting after login except for a specific page
  8. wp_enqueue_script was called incorrectly
  9. Add multiple custom fields to the general settings page
  10. Adding fields to the “Add New User” screen in the dashboard
  11. Issues with title-tag and document_title_parts
  12. Import WordPress XML File from Within Functions.php
  13. Define custom Page Template without its own .php file
  14. Does hooking into the same action multiple times drain memory?
  15. WordPress auto login after registration not working
  16. How to influence the information displayed on widget inside wp-admin
  17. Extract image from content and set it as the featured image
  18. Is there a hook or function I can use to display all theme files being used on a current page?
  19. How to add first name & last name to default registration form?
  20. Issue with get_theme_mod returning a blank value instead of the saved value
  21. Add action hook conditionally – only when home.php in use
  22. Show modified time if post is actually modified
  23. why doesnt is_home() work in functions.php
  24. Masking logout URL
  25. How to create thumbnails for PDF uploads?
  26. Implementing DNS Prefetching with WordPress
  27. Help me to understand wp_header() and wp_footer() functions
  28. Is it possible to use a forgot password url filter?
  29. In WooCommerce I need to modify the thankyou.php page [closed]
  30. Change the footer text on the login page
  31. How can I add an extra WooCommerce hook
  32. Why get_header() or get_footer() does not run twice if called in the same php file?
  33. Create new user without password
  34. How to display error messages using WP_Error class?
  35. redirect wp-login.php to another page
  36. Remove Page Title from Static Frontpage
  37. How can I do customizations on login, registration and password recovery forms?
  38. Set default options for inserting media
  39. Change parent theme file function in child themes functions.php
  40. Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
  41. How to hook into the quick edit action?
  42. gform_after_submission content appears immediately after , not in post body [closed]
  43. Login using the password from protected pages
  44. How do I change parameters without changing the core
  45. Restrict user registration to emails on a single domain
  46. How do I redirect upon login a specific user based on role?
  47. Is it possible to be more page/post specific with admin_enqueue_script?
  48. Logging in redirects to correct page but shows logged out content until forced refresh
  49. WooCommerce add_action hook results in 500 error
  50. Issue adding text after short description on product pages Woocommerce [closed]
  51. Customize “the_posts_pagination” and put list instead div
  52. WordPress registration and contact form 7 [closed]
  53. Increment price for Woocommerce Minicart [closed]
  54. how to change link of some wordpress pages
  55. Custom registration URL lost when user makes signup mistake
  56. Gravity Forms field entries into wp_query loop [closed]
  57. Post thumbnail relative link and HTML modify
  58. Proper way of using functions in action hook?
  59. is_user_logged_in not working to redirect only logged out users
  60. How to preserve edits to Name or Slug of term when using wp_update_term on save?
  61. Accepted arguments value in hook functions
  62. Get current page_id before loop, in functions.php
  63. Members only site – still need the lost password page accessible
  64. How to properly add function called by action-hooked function to functions.php?
  65. Which action hook to use for function?
  66. Change size and crop medium_large images
  67. Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
  68. How to add custom fields to my custom registration form
  69. Running a script before absolutely everything
  70. Inserting a functions output after the content
  71. How to display post content instead of excerpt
  72. Add function to every post?
  73. How to change login labels
  74. Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
  75. Modify a function without editing template
  76. Don’t delete a page if it holds users
  77. Problem only while using require_once() within functions.php
  78. Passing values from a widget to a function within a plugin
  79. Which action does wp_update_user triggers?
  80. Display alert on successful user Sign Up
  81. Trigger a custom function when option are saved in admin area
  82. Execute a ultimate member action when user role is updated
  83. Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
  84. How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
  85. What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
  86. Login Redirect if Logged in from Specific Page
  87. Unable to login using username
  88. Change label for registration Fields
  89. Replace a menu with widget or a custom template file programmatically
  90. When a user logs in, how can they view the website instead of the admin menu?
  91. Footer disappears when using the_content ( )
  92. WordPress PHP Conflicting User Sessions
  93. Multisite 404 on pages – rewrite error breaks database
  94. jQuery does not work
  95. Why does re-using this function not work? [closed]
  96. Pass parameter to hooked function using custom page template
  97. Override the WordPress core function wp_referer_field
  98. How to return hook data when multiple parameters are present?
  99. Hook into a function without a hook?
  100. Trying to register script in footer
Categories functions Tags functions, hooks, login, user-registration
Display all WP Errors together during form validation
How to enforce the selection of at least one term from a custom taxonomy?

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress