Skip to content

Commit

Permalink
Remove last remaining call to profile_get_row()
Browse files Browse the repository at this point in the history
Replacing it with profile_get_row_direct().

Since profiles identified with a globally unique ID, it does not make
sense for the API to require a user ID to retrieve a profile, as it
needlessly complexifies the caller's code.

Fixes #27258
  • Loading branch information
dregad committed Sep 18, 2020
1 parent 73caf1b commit 59d78ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions account_prof_edit_page.php
Expand Up @@ -65,10 +65,8 @@
$t_global_profile = profile_is_global( $f_profile_id );
if( $t_global_profile ) {
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
$t_row = profile_get_row( ALL_USERS, $f_profile_id );
} else {
$t_row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
}
$t_row = profile_get_row_direct( $f_profile_id );

/**
* @var $v_id
Expand Down

0 comments on commit 59d78ad

Please sign in to comment.