Skip to content

Commit

Permalink
Update SlackUser.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot authored Nov 2, 2017
1 parent b9deffa commit 7ae69cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SlackUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public function getId()
*
* Does not include the @ symbol at the beginning.
*
* @return string The user's username.
* @return string The user's username, or null if no username is available.
*/
public function getUsername()
{
return $this->data['name'];
return isset($this->data['name']) ? $this->data['name'] : null;
}

/**
Expand Down

0 comments on commit 7ae69cc

Please sign in to comment.