creating an unlisted admin Page
Using Jamroom
Based on what you're looking for, why not just use a template?
if (isset($_us['preferredUsername']) && strlen($_us['preferredUsername']) > 0) {
$user_name = $_us['preferredUsername'];
}
elseif (isset($_us['displayName']) && strlen($_us['displayName']) > 0) {
$user_name = $_us['displayName'];
}
elseif (isset($_us['name']['formatted']) && strlen($_us['name']['formatted']) > 0) {
$user_name = $_us['name']['formatted'];
}
elseif (isset($_us['profileUrl']) && strlen($_us['profileUrl']) > 0) {
$utmp = explode('/', $_us['profileUrl']);
$user_name = end($utmp);
}
elseif (isset($_us['accounts'][0]['username']) && strlen($_us['accounts'][0]['username']) > 0) {
$user_name = $_us['accounts'][0]['username'];
}
elseif (strpos($email, '@')) {
list($user_name,) = explode('@', $email);
}
else {
// Hopefully we never get here
$user_name = mt_rand(11111, 99999);
}