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

Disable user profile editing for one user

If you want to completerly remove the possibility for an user to access on profile, you can Give admin possibility to choose which user can access on profile and which not Remove the profile link from menu and from admin bar Ensure the profile is not accessible even if accessed directly by manually typing address … Read more