wp_login action passes 2 arguments $user_login and $user. The second argument is the object of WP_User class, which you can use to get user id from:
function reset_dismiss_message( $user_login, $user ) {
update_user_meta( $user->ID, 'tgmpa_dismissed_notice', false );
}
add_action( 'wp_login', 'reset_dismiss_message', 10, 2 );
Related Posts:
- Override WordPress user with Oauth2 account
- Custom Filter in WordPress to modify footer information via plugin?
- Is it heavyweight plugins or lots of plugins that make a site slow?
- Why does wp_enqueue_style() in plugin not load stylesheet?
- Admin plugin, how can I output a different content-type?
- Editor access to plugin settings
- Network-Wide Plugin Settings Management
- Has anyone been able to get the aweber plugin to work
- Use Media Uploader in Plugin
- wp_nav_menu(); Outside WordPress installation
- Install plugin remotely
- Woocommerce: Changing the variations select default value? [closed]
- Best Apache Log Analyzer Plugin? [closed]
- Akismet plugin is deleting spam despite preferences
- Star rating for custom post types [closed]
- How to Make a Custom Grid View
- Extend the Admin Post/Edit page
- How WordPress knows where to find locale files?
- Can wp_script_is used in pluginA check if a script is being enqueued/registered from pluginB?
- Reuse javascripts from plugins within the theme
- WP theme with Backbone
- $wpdb working with ajax but showing ajax error instead of success
- Inserting large amounts of data into a custom table during plugin install
- WP-Markdown treating java generics like HTML tags
- Can’t get title of latest post
- Display success message after wp_update_post
- Global variables during plugin activation , deactivation and uninstall operarations
- Need help restoring my WordPress blog
- White page on custom plugin option submit
- Image upload and other options in the same plugin settings form?
- “Request has expired” with “Make your site social” (Gigya) plugin
- WordPress display breadcrumbs using Yoast plugin [closed]
- How to change this WP_Query to get all ProductIDs and not only specific one?
- WordPress plugin output formatting
- Finding which plugin uses cloudflare (due to GDPR)
- how to use in custom single.php template using php?
- Automatically Assign Author to Category [closed]
- How can I change the meta_key for a particular piece of information?
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- WordPress premium theme development [duplicate]
- the_tags : can we insert a class
- How to pass the API key to the client from the database? [closed]
- Elementor: How to override global theme style settings? [closed]
- Add user role to generated plugin
- Modify page title and subtitle with a plugin
- override filter in a plugin
- Odd /wp-admin/admin-ajax.php entries showing in Wassup
- Hook into the rendering of a WordPress Template
- Setting Email locale before retrieving gettext translations
- Is there a maximum length to a WordPress Page?
- I changed .live() to .on() but change is not reflected on the server
- Save user total active time after login in wordpress [closed]
- How to track analytics with a WordPress site under the same domain as my main site?
- Plugin to reformat the post automatically after submitting
- Submit plugin for review
- Calling a save function from a “submit” button
- Designing a plugin that uses an iFrame to process data in admin
- Add a “default sorting” menu to child store pages
- How to hook into action/filter call
- Select Form Element Not Saving from Plugin Options
- WordPress Plugin for pastimes/participation in contest [closed]
- Plugin to create unlimited custom shortcodes?
- How do I create pages within a WordPress post?
- Gutenberg default attributes are empty when accessing in edit
- Ajax 400 error when used inside a plugin
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How can I display selected content from a seperate database in an Activity style widget?
- how to show all posts of each category in pages
- Error thrown Call to a member function get() on null
- Allowed memory size of 134217728 … wp-includes/wp-db.php on line 1989
- Pricing Calculator – WordPress
- reminder wp_schedule_event
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Make the product page as homepage WooCommerce
- Adding shortcodes to multiple pages with function
- Genesis Child Theme – Customize body
- Media Dialog CSS broken in WP v.5.3.2
- Multiple wordpress installations with same plugin folder (Apache Virtualhost)
- Slide through page effect?
- Get a list of Product Categories inside a loop
- How to update plugins in a distributed wordpress scenario?
- What’s the preferred method of writing AJAX-enabled plugins?
- WordPress API hook
- jquery conflict with widget page
- Automatically add child pages to menu
- Infinite Scroll plugin scrolling truly “infinitely” (i.e. does not recognize end of posts)
- Simple Data Table Update and Page Integration
- How to add a box for list items?
- wp_update_post call really slow when official Facebook plugin is installed
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- Woocommerce custom fields
- This plugin throws error on the events page only [closed]
- White Screen When Includding A Folder With PHP Files
- making a simple plugin
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- Custom single-product page for product from category x
- edit slider plugin capability for custom_role
- Plugin Block at the backend of every page or post
- Custom Login and Password Reset for BuddyPress Website
- How to add a react element into the DOM node (only on the user-interaction like on click) without using the state?