This was more of an exercise in starting to find my way around the script than anything else.
The admin panel doesn't show who you're logged in as until you've set a first name for yourself in your user properties. First names make sense for customers because they log in with an email address, but for an admin user it's not immediately obvious what's happening. To get around this (and show the username instead):
add:
Code: Select all
function getUserName() {
return (isset($this->data['username']) ? $this->data['username'] : NULL);
}
and replace:
Code: Select all
$view->set('user', $language->get('text_user', $user->getFirstName()));
Code: Select all
//$view->set('user', $language->get('text_user', $user->getFirstName()));
$view->set('user', $language->get('text_user', $user->getUserName()));