Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fixed bug for IssueContent::canView(userId) when userId is string
Browse files Browse the repository at this point in the history
  • Loading branch information
githubjeka committed Oct 1, 2018
1 parent 8f93ade commit b856da4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/IssueContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public function canView($user = null)
{
if ($user === null && !\Yii::$app->user->isGuest) {
$user = \Yii::$app->user->getIdentity();
} else if (!$user instanceof User) {
$user = User::findOne(['id' => $user]);
}

$visibility = (int)$this->visibility;
Expand Down

0 comments on commit b856da4

Please sign in to comment.