Allowing users to edit only their page and nobody else’s
The Role Scoper plugin can enable this.
The Role Scoper plugin can enable this.
Seeing that the referenced answer stores users_online as an array of timestamps indexed by user ID, you can use the include argument for WP_User_Query: $args = array( ‘include’ => array_keys( $logged_in_users ), // Other arguments );
I found an answer here i will give this a try.. Confirmation required on email change
First, check for get_current_user_id. Then create a log of visits by adding information to a user’s metadata with update_user_meta & get_user_meta. On every page hit that you care about you can run a function to determine rate/limit of usage per user. If they break the rules, you can redirect to a page that doesn’t contain … Read more
As many people would agree, editing WordPress’ core is not recommended because any updates that are made from the official developer (ex: 4.6 to 4.6.1) will override your changes. Plus, editing the core could potentially break your website or any other theme/plugin if it’s not properly edited. This is where plugins come in, they are … Read more
To update a user’s role, here’s a sample code. $user_id = get_current_user_id(); $user = new WP_User( $user_id ); $user->set_role( ‘my_new_role’ ); Hope that helps
Redirect current user
Change the [user] to [users][]. Hope that will fix the problem. Now you’ll get all the value in associative array within [users][‘your-checkbox-data-array’] So your code will be like- <?php $WPusers = get_users( ‘orderby=nicename&role=administrator’ ); foreach ( $WPusers as $user ) { ?> <input type=”checkbox” name=”<?php echo $this->plugin_name; ?>[users][]” id=”<?php echo $this->plugin_name; ?>-users” value=”<?php echo $user->ID; … Read more
You can use user_register action for this task. This action fires immediately after a new user is registered. add_action( ‘user_register’, ‘myplugin_registration_save’, 10, 1 ); function myplugin_registration_save( $user_id ) { //Your Code }
My first guess would be to try following: Create a separate clean install of multisite Move user tables from it to your site I vaguely remember encountering situation like this before, but not what the outcome was. Also backup current state immediately, so at least you have that captured, in case you make things worse … Read more