mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Unnecessary code removed
This commit is contained in:
@@ -269,29 +269,6 @@
|
||||
exit( wp_redirect($url) );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @secure passwords
|
||||
*** Updated by Bo Carlson (bo@fictiontribe.com) to clear fields in DB without looping users. Much faster.
|
||||
***/
|
||||
add_action('um_admin_do_action__um_passwords_secured', 'um_admin_do_action__um_passwords_secured');
|
||||
function um_admin_do_action__um_passwords_secured( $action ){
|
||||
global $ultimatemember; //ultimate member global object
|
||||
global $wpdb; //Wordpress DB object
|
||||
|
||||
//die if admin can't manage options
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
//remove all confirm_user_password from DB
|
||||
$wpdb->delete($wpdb->usermeta,array('meta_key'=>'confirm_user_password') );
|
||||
|
||||
//then reset submitted
|
||||
$wpdb->update($wpdb->usermeta,array('meta_value'=>''),array('meta_key'=>'submitted') );
|
||||
|
||||
//then set flag that update is complete and redirect to admin home
|
||||
update_option( 'um_passwords_secured', 1 );
|
||||
exit( wp_redirect( admin_url() ) );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @purge temp
|
||||
***/
|
||||
|
||||
@@ -41,14 +41,6 @@ class UM_Admin_Notices {
|
||||
global $ultimatemember;
|
||||
$hide_register_notice = get_option('um_can_register_notice');
|
||||
|
||||
if ( !get_option('um_passwords_secured') ) {
|
||||
echo '<div class="updated error"><p>';
|
||||
|
||||
echo sprintf(__( 'Secure your database by removing hardcoded user passwords now. Click <a href="%s">here</a> to secure your database.', 'ultimatemember' ), add_query_arg('um_adm_action', 'um_passwords_secured') );
|
||||
|
||||
echo '</p></div>';
|
||||
}
|
||||
|
||||
if ( !get_option('users_can_register') && !$hide_register_notice ) {
|
||||
|
||||
echo '<div class="updated" style="border-color: #3ba1da;"><p>';
|
||||
|
||||
Reference in New Issue
Block a user