Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure specified user exists in selection list
print_user_option_list() is used to display user selection lists. When
editing a bug having a handler that has been demoted, it is important
that the former developer is included in the list, otherwise the bug's
handler would be set to 0.

Fixes #19574
  • Loading branch information
dregad committed Apr 16, 2015
1 parent c0976d0 commit 1ddb400
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/print_api.php
Expand Up @@ -296,6 +296,11 @@ function print_user_option_list( $p_user_id, $p_project_id = null, $p_access = A
$t_users = project_get_all_user_rows( $p_project_id, $p_access );
}

# Ensure the specified user exists in the array
if( $p_user_id != NO_USER && !array_key_exists( $p_user_id, $t_users ) ) {
$t_users[$p_user_id] = user_get_row( $p_user_id );
}

$t_display = array();
$t_sort = array();
$t_show_realname = ( ON == config_get( 'show_realname' ) );
Expand Down

0 comments on commit 1ddb400

Please sign in to comment.