- $page->setTitle($login->fullName());
-
- // Prepares the display of the user's mugshot.
- $photo = 'photo/' . $login->hrid() . ($new ? '/req' : '');
- if (!isset($user['photo_pub']) || !has_user_right($user['photo_pub'], $view)) {
- $photo = "";
- }
- $page->assign('photo_url', $photo);
-
- if (!isset($user['y']) and !isset($user['x'])) {
- list($user['x'], $user['y']) = getimagesize("images/none.png");
- }
- if (!isset($user['y']) or $user['y'] < 1) $user['y']=1;
- if (!isset($user['x']) or $user['x'] < 1) $user['x']=1;
- if ($user['x'] > 240) {
- $user['y'] = (integer)($user['y']*240/$user['x']);
- $user['x'] = 240;
- }
- if ($user['y'] > 300) {
- $user['x'] = (integer)($user['x']*300/$user['y']);
- $user['y'] = 300;
- }
- if ($user['x'] < 160) {
- $user['y'] = (integer)($user['y']*160/$user['x']);
- $user['x'] = 160;
- }