diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-31 23:41:36 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-31 23:41:36 +0100 |
commit | c5010893af7040a0c17521029a1d7838719d89bc (patch) | |
tree | e952b82d2e0d7db6c8010307670eff37037986b6 | |
parent | aed2d8c79b2f0a8ff4834eea340109455a304d9f (diff) | |
download | symfony-security-c5010893af7040a0c17521029a1d7838719d89bc.zip symfony-security-c5010893af7040a0c17521029a1d7838719d89bc.tar.gz symfony-security-c5010893af7040a0c17521029a1d7838719d89bc.tar.bz2 |
[Security] added some missing unit tests
-rw-r--r-- | Authentication/Token/Token.php | 4 |
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'; } } |