mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
!!! IMPORTANT 2.0 version before upgrade please run full backup of your site !!!
- new code structure, optimized for next development; - created spl_autoloader for remove includes; - UM classes with namespaces; - deprecated global $ultimatemember; variable (use UM() instead); - new UM/WP roles logic; - new settings class and logic (deprecated Redux framework, deprecated some old options, added some new options); - new dependencies class for extensions; - WP native styles for backend fields; - new upgrades and license activations for extensions; - new logic form backend forms and fields; - created uninstall.php file for delete permanently all UM settings; - optimized registration/upgrade profile process; Deprecated Hooks: um_new_user_registration_plain um_user_registration_extra_hook um_add_user_frontend um_post_registration_global_hook um_admin_extend_directory_options_general (was action...will be filter)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
// If this file is called directly, abort.
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* This populates all existing UM users with meta_key `last_login` as `user_registered` if the meta key doesn't exist.
|
||||
* Target Version: 1.3.39
|
||||
*/
|
||||
|
||||
global $wpdb;
|
||||
$wpdb->query('INSERT INTO '.$wpdb->usermeta.'(user_id, meta_key, meta_value)
|
||||
SELECT uu.ID, "_um_last_login", uu.user_registered
|
||||
FROM '.$wpdb->users.' AS uu
|
||||
WHERE
|
||||
uu.ID NOT IN(
|
||||
SELECT user_id FROM '.$wpdb->usermeta.'
|
||||
WHERE meta_key = "_um_last_login"
|
||||
GROUP BY user_id
|
||||
)'
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user