Commit b31cebac authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Correction de bug du mouchard si pas d'utilisateur connecté

parent f1eba1aa
...@@ -22,7 +22,10 @@ class MouchardCompleterAuth implements MouchardCompleterInterface ...@@ -22,7 +22,10 @@ class MouchardCompleterAuth implements MouchardCompleterInterface
*/ */
public function complete(MouchardMessage $message) public function complete(MouchardMessage $message)
{ {
$message->setUser((string)$this->getServiceUserContext()->getDbUser()->getDisplayName()); $user = $this->getServiceUserContext()->getDbUser();
if ($user) $user = $user->getDisplayName();
$message->setUser($user);
$message->setRole((string)$this->getServiceUserContext()->getSelectedIdentityRole()); $message->setRole((string)$this->getServiceUserContext()->getSelectedIdentityRole());
return $this; return $this;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment