summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Authentication/Token/Token.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Authentication/Token/Token.php b/Authentication/Token/Token.php
index 46a97e2..808f151 100644
--- a/Authentication/Token/Token.php
+++ b/Authentication/Token/Token.php
@@ -71,8 +71,10 @@ abstract class Token implements TokenInterface
{
if (!is_object($this->user)) {
return (string) $this->user;
- } else {
+ } elseif ($this->user instanceof AccountInterface) {
return $this->user->getUsername();
+ } else {
+ return 'n/a';
}
}