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
- Import WordPress XML File from Within Functions.php
- 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
- Is there a hook or function I can use to display all theme files being used on a current page?
- 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?
- How can I add an extra WooCommerce hook
- 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
- How to hook into the quick edit action?
- Login using the password from protected pages
- 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?
- WooCommerce add_action hook results in 500 error
- Customize “the_posts_pagination” and put list instead div
- Gravity Forms field entries into wp_query loop [closed]
- Post thumbnail relative link and HTML modify
- Accepted arguments value in hook functions
- Get current page_id before loop, in 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]
- Running a script before absolutely everything
- Inserting a functions output after the content
- How to change login labels
- Modify a function without editing template
- Don’t delete a page if it holds users
- Problem only while using require_once() within functions.php
- 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
- Change label for registration Fields
- Footer disappears when using the_content ( )
- WordPress PHP Conflicting User Sessions
- Multisite 404 on pages – rewrite error breaks database
- Pass parameter to hooked function using custom page template
- Hook into a function without a hook?
- Trying to register script in footer
- Is my code correct to enqueue CSS on a specific page?
- Run a code only on theme activation only during first activation
- Can’t properly set the_title add_filter to show short_URL
- Filter yoast canonical add_action priority [closed]
- (Woocommerce) Order by price when entering specific category
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Is there a way to prevent a function/method from being called outside a specific hook?
- Function not working inside of a function in functions.php
- Secondary Menu and Logged In Users
- Adding code before post title with the_title produces weird results
- error at login page in wordpress
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Logout Redirect and also WP-login.php Redirect
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- update_post_meta is Updating with two page id
- call wp_insert_user in custom class doesnt work
- How to conditionally add a widget via a hook in functions.php
- Changing the text of Upload/Insert on Posts and Pages Screen
- How to add or delete default value theme options while activate and deactivate theme
- Warning at top of website & top menu gone
- Prevent wp_signon redirect on failed login for ajax login
- How to replace ACTION url from original wordpress login form?
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- custom error message for empty username and password using authenticate filter not working
- Get post_author email for Zapier Integration
- How can I stop the hook from breaking the login/logout function?
- True email confirmation for registration (keeping unvalidated users from user table)
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- Set display name from nickname with register process
- Redirect after login to current URL
- Restrict certain roles registrations by domain
- Changing the register url is not working
- Login functions
- save_post hook – headers already sent?
- Init hook for header send
- How to request login for user but not for bots
- Add custom fields after post/page title
- Force resize for all video content
- is_user_logged_in() isn’t working
- Unhook the comment form in Buddypress
- How do I add functionality to images?
- How to hook wp_mail to add a custom email as BCC for each sent email?
- Get category of post inside save_post hook
- Log in and out using custom pages, no logout confirmation and redirects for logging in and out 2023
- Copy and Modified WooCommerce function is_coupon_valid [closed]