From 0735173299d554fc35e5fcf2677bdc4d61f7c379 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Fri, 14 Dec 2012 14:37:52 +0100 Subject: [PATCH] Do not remove current user from list As mentioned by atrol in issue #10130, removing the current user causes potential loss of functionality when using filters because [myself] (handler_id = -1) is not the same as a specific handler_id. This is a partial revert of 748c4cec6457475673f21ad554ba1791c90222c7. --- core/print_api.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/print_api.php b/core/print_api.php index 9fc5372a2f..d277dd545c 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -248,12 +248,6 @@ function print_user_option_list( $p_user_id, $p_project_id = null, $p_access = A $t_show_realname = ( ON == config_get( 'show_realname' ) ); $t_sort_by_last_name = ( ON == config_get( 'sort_by_last_name' ) ); foreach( $t_users as $t_key => $t_user ) { - # Remove current user from the list (there is a "myself" value) - if( $t_user['id'] == $t_current_user ) { - unset( $t_users[$t_key] ); - continue; - } - $t_user_name = string_attribute( $t_user['username'] ); $t_sort_name = utf8_strtolower( $t_user_name ); if( $t_show_realname && ( $t_user['realname'] <> '' ) ) {