Bug when user profile displayed by admin
-
This code:
function rpg_user_profile_field() { global $current_user; global $rpg_groups ; if (isset($_REQUEST['user_id'])) { $user_id = $_REQUEST['user_id']; } else { $user_id = $current_user->ID; }
sets the incorrect user id when this code is invoked from a User Profile when viewed by an admin.
Situation: As an admin, I open the Profile of some user from the link of their name on a post or whatever. This does open the bbp provile paage of that user. Also includes the Edit link. So now I (logged in as an admin) open the Edit link, and get the bbp version of the profile editor as desired.
So all the user information of that user is correct and available to me as the admin to edit. EXCEPT the private group checkboxes. Instead of the value for the user, the group values are those of me, the admin. Not so good. This would be the preferred way for an admin to edit a group to which a user belongs instead of using the full user edit page from the dashboard.
Don’t know when the $_REQUEST[‘user_id’] value might be used, but it looks like opening a user’s profile ends up setting $user_id to the admin’s id instead of the user’s id.
- The topic ‘Bug when user profile displayed by admin’ is closed to new replies.