Commit ff9142fc authored by Robert Lyon's avatar Robert Lyon

Checking for $user->urlid before trying to access it (bug #1253462)

In some cases the $user->urlid may not be present - this checks for it
before accessing it otherwise it falls back to the $id to get info

Change-Id: I989e68321402f458b167879e994150213c3e4893
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 6ad43a71
......@@ -1609,7 +1609,8 @@ function profile_url($user, $full=true, $useid=false) {
else if (is_numeric($user)) {
$id = $user;
$urlid = $wantclean ? get_user_for_display($id)->urlid : null;
$user = get_user_for_display($id);
$urlid = ($wantclean && !empty($user->urlid)) ? $user->urlid : null;
else if (isset($user->id)) {
$id = $user->id;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment