Skip to content

Commit

Permalink
feat: add __toString() method to CasUserInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 7, 2022
1 parent 068fb1c commit 28f74ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Security/Core/User/CasUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public function __construct(array $data)
$this->storage = $data;
}

public function __toString(): string
{
return $this->get('user');
}

public function eraseCredentials(): void
{
}
Expand Down
2 changes: 2 additions & 0 deletions src/Security/Core/User/CasUserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

interface CasUserInterface extends EquatableInterface, UserInterface
{
public function __toString(): string;

/**
* @param mixed $default
*
Expand Down

0 comments on commit 28f74ff

Please sign in to comment.