Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 748c4ce.
  • Loading branch information
dregad committed Dec 14, 2012
1 parent e7b24a6 commit 0dfe254
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/print_api.php
Expand Up @@ -273,12 +273,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'] <> '' ) ) {
Expand Down

0 comments on commit 0dfe254

Please sign in to comment.