cast result to bool

This commit is contained in:
Robin Appelman 2013-06-03 13:39:34 +02:00
parent eb2a1e0f8a
commit 83fbdc903f
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ class User {
public function setDisplayName($displayName) {
if ($this->canChangeDisplayName()) {
$this->displayName = $displayName;
return $this->backend->setDisplayName($this->uid, $displayName);
$result = $this->backend->setDisplayName($this->uid, $displayName);
return $result !== false;
} else {
return false;
}