Commit ce38179f authored by Nigel McNie's avatar Nigel McNie
Browse files

Make it so display_name doesn't require the user to have staff and admin...

Make it so display_name doesn't require the user to have staff and admin properties set. That was really pissing me off.
parent 12b7ee0c
......@@ -384,7 +384,7 @@ function display_name($user, $userto=null, $nameonly=false) {
// if they don't have a preferred name set, just return here
if (empty($user->preferredname)) {
if (($userto->admin || $userto->staff) && !$nameonly) {
if ((!empty($userto->admin) || !empty($userto->staff)) && !$nameonly) {
return $user->firstname . ' ' . $user->lastname . ' (' . $user->username . ')';
}
return $user->firstname . ' ' . $user->lastname;
......
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