api) return; if (!$User->login) { $target = urlencode($_SERVER['REQUEST_URI']); abort("/login?goto=$target", 303); } elseif ($User->admin('user') and $username = @$_REQUEST['login']) { try { $user = new User("profile/$username"); } catch (Exception $e) { printf('

%s

', $e->getMessage()); return; } $Page->title = $user->login . ': ' . $Page->title; } else { $user = $User; } $Page->place['login/name'] = $user->name ?: 'bewoner'; $Page->place['user'] = $user->login; if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) { if (substr($password, 0, 1) == '$') { $password = NULL; // hashed } $Page->place['pass'] = htmlspecialchars($password) ?: 'zelf ingesteld'; } else { $Page->place['pass'] = 'onbekend'; } print ''."\n";