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:
- How can I tell if I’m on a login page? [duplicate]
- How to override WordPress registration and insert an auto-generated username?
- Remove default user registration, login and subscriber profiles
- How can I get my Script to work on the Login page?
- Get User Login Data (date, time… )
- Unable to login after registration
- Redirecting after login except for a specific page
- wp_enqueue_script was called incorrectly
- Add multiple custom fields to the general settings page
- Adding fields to the “Add New User” screen in the dashboard
- Issues with title-tag and document_title_parts
- Import WordPress XML File from Within Functions.php
- Define custom Page Template without its own .php file
- Does hooking into the same action multiple times drain memory?
- WordPress auto login after registration not working
- How to influence the information displayed on widget inside wp-admin
- Extract image from content and set it as the featured image
- Is there a hook or function I can use to display all theme files being used on a current page?
- How to add first name & last name to default registration form?
- Issue with get_theme_mod returning a blank value instead of the saved value
- Add action hook conditionally – only when home.php in use
- Show modified time if post is actually modified
- why doesnt is_home() work in functions.php
- Masking logout URL
- How to create thumbnails for PDF uploads?
- Implementing DNS Prefetching with WordPress
- Help me to understand wp_header() and wp_footer() functions
- Is it possible to use a forgot password url filter?
- In WooCommerce I need to modify the thankyou.php page [closed]
- Change the footer text on the login page
- How can I add an extra WooCommerce hook
- Why get_header() or get_footer() does not run twice if called in the same php file?
- Create new user without password
- How to display error messages using WP_Error class?
- redirect wp-login.php to another page
- Remove Page Title from Static Frontpage
- How can I do customizations on login, registration and password recovery forms?
- Set default options for inserting media
- Change parent theme file function in child themes functions.php
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- How to hook into the quick edit action?
- gform_after_submission content appears immediately after , not in post body [closed]
- Login using the password from protected pages
- How do I change parameters without changing the core
- Restrict user registration to emails on a single domain
- How do I redirect upon login a specific user based on role?
- Is it possible to be more page/post specific with admin_enqueue_script?
- Logging in redirects to correct page but shows logged out content until forced refresh
- WooCommerce add_action hook results in 500 error
- Issue adding text after short description on product pages Woocommerce [closed]
- Customize “the_posts_pagination” and put list instead div
- WordPress registration and contact form 7 [closed]
- Increment price for Woocommerce Minicart [closed]
- how to change link of some wordpress pages
- Custom registration URL lost when user makes signup mistake
- Gravity Forms field entries into wp_query loop [closed]
- Post thumbnail relative link and HTML modify
- Proper way of using functions in action hook?
- is_user_logged_in not working to redirect only logged out users
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- Members only site – still need the lost password page accessible
- How to properly add function called by action-hooked function to functions.php?
- Which action hook to use for function?
- Change size and crop medium_large images
- Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
- How to add custom fields to my custom registration form
- Running a script before absolutely everything
- Inserting a functions output after the content
- How to display post content instead of excerpt
- Add function to every post?
- How to change login labels
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Modify a function without editing template
- Don’t delete a page if it holds users
- Problem only while using require_once() within functions.php
- Passing values from a widget to a function within a plugin
- Which action does wp_update_user triggers?
- Display alert on successful user Sign Up
- Trigger a custom function when option are saved in admin area
- Execute a ultimate member action when user role is updated
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- Login Redirect if Logged in from Specific Page
- Unable to login using username
- Change label for registration Fields
- Replace a menu with widget or a custom template file programmatically
- When a user logs in, how can they view the website instead of the admin menu?
- Footer disappears when using the_content ( )
- WordPress PHP Conflicting User Sessions
- Multisite 404 on pages – rewrite error breaks database
- jQuery does not work
- Why does re-using this function not work? [closed]
- Pass parameter to hooked function using custom page template
- Override the WordPress core function wp_referer_field
- How to return hook data when multiple parameters are present?
- Hook into a function without a hook?
- Trying to register script in footer