if ($userservice->isLoggedOn()) {
$cUser = $userservice->getCurrentUser();
$cUsername = $cUser[$userservice->getFieldName('username')];
if ($userservice->isLoggedOn()) {
$cUser = $userservice->getCurrentUser();
$cUsername = $cUser[$userservice->getFieldName('username')];