Skip to content

Commit

Permalink
Fix #12504: Error in Edit User page when queried by LDAP username
Browse files Browse the repository at this point in the history
Use $t_user_id instead of $f_user_id variable, as the latter is not initialized when the user is identified by their username instead of id.

Also removed useless assignment of $f_user_id, as the variable is not referenced anymore.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
  • Loading branch information
dregad authored and davidhicks committed Nov 19, 2010
1 parent a14b882 commit 8b0fe3c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions manage_user_edit_page.php
Expand Up @@ -63,8 +63,7 @@
$f_username = gpc_get_string( 'username', '' );

if ( is_blank( $f_username ) ) {
$f_user_id = gpc_get_int( 'user_id' );
$t_user_id = $f_user_id;
$t_user_id = gpc_get_int( 'user_id' );
} else {
$t_user_id = user_get_id_by_name( $f_username );
if ( $t_user_id === false ) {
Expand Down Expand Up @@ -120,7 +119,7 @@
<?php
// With LDAP
if ( $t_ldap && ON == config_get( 'use_ldap_realname' ) ) {
echo string_display_line( user_get_realname( $f_user_id ) );
echo string_display_line( user_get_realname( $t_user_id ) );
}
// Without LDAP
else {
Expand All @@ -141,7 +140,7 @@
<?php
// With LDAP
if ( $t_ldap && ON == config_get( 'use_ldap_email' ) ) {
echo string_display_line( user_get_email( $f_user_id ) );
echo string_display_line( user_get_email( $t_user_id ) );
}
// Without LDAP
else {
Expand Down

0 comments on commit 8b0fe3c

Please sign in to comment.