Show MD5 Password in user section

To get MD5 password in user listing column, you have to get user_pass using get_userdata(). see below example how to get user_pass from get_userdata() add_action(‘manage_users_custom_column’, ‘cmr_supwd_show_upwd_col_data’, 10, 3); function cmr_supwd_show_upwd_col_data($value, $column_name, $user_id) { $user = get_userdata( $user_id ); if ( ‘user_pass’ == $column_name ) return $user->user_pass; return $value; }

Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file

RewriteCond %{HTTP_COOKIE} !.*wordpress_logged_in.*$ [NC] RewriteCond %{REQUEST_URI} ^(.*?/?)purchase.php RewriteRule . https://%{HTTP_HOST}%1/registrationurl [L,QSA] This will result in a 302 (temporary) redirect to /purchaseads//registrationurl – note the double-slash. This double-slash is passed through to the $_SERVER[‘REQUEST_URI’] variable that WordPress uses to route the URL. So, this may result in WP not being able to route the request. You … Read more

How can I check if a user’s email exists in the database

There’s the email_exists() function that could help you with checking if an email already exists among users. It’s e.g. used by register_new_user(). More here: https://developer.wordpress.org/reference/functions/email_exists/ https://developer.wordpress.org/reference/functions/register_new_user/

Force logout ALL users at a certain time

This should be possible, WordPress provides the WP_Session_Tokens class to manage logged in sessions. Then it’s just a matter of connecting it to the cron. The following is a simple plugin file which I think should do it. Add it to the plugins directory and it should start working. *not tested. <?php /* Plugin Name: … Read more

14,000 WordPress Users. How did they get there?

They were probably automatically created by spam bots. You can disable user registration by going to the Settings > General page and unchecking the Anyone Can Register box. You’ll still be able to manually create users, but users won’t be able to register themselves automatically. If you want to allow users to register, but still … Read more

Register new user in the frontend

Yes, yes you can. The relevant functions to do this are: wp_create_user Creates a user given a user/pass/email wp_insert_user Creates or updates a user given user/pass/email add_user_meta Adds User Meta ( same as Post Meta/Custom fields but for users rather than posts ) You’ll find examples on how to use those functions, and links to … Read more

Is it possible to get the currently logged in admin’s IP?

This functionality is not directly available, you’ll have to track the logins inside the database(probably as a transient) & check if that transient is available. function check_for_admin() { $user = wp_get_current_user(); if(in_array(‘administrator’, $user->roles)) set_transient(‘admin_ip’, get_ip(), 60*10); } add_action(‘init’, ‘check_for_admin’); After that you can use get_transient(‘admin_ip’) & check if it’s available For retrieving the IP, you … Read more