throttle/limit a logged in user’s http requests to specific page on a per day basis

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

Output checkbox per user and save in plugin options

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

Get meta key with value for user

Use get_user_meta() to get the meta data associated with the users in your loop: <?php $roles = array(‘autobuyer’); $users = array(); foreach ( $roles as $role ) { $args = array( ‘role’=>$role, ‘orderby’ => ‘registered’, ‘order’ => ‘ASC’, ‘search_columns’ => ‘nicename’, ‘number’=> 0, ‘date_query’ => array( ‘after’ => ‘October 14st, 2013’, ‘before’ => array( ‘year’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)