Tests whether a user has permission to view a specific discussion.
public canView ( object | array | integer $discussion, integer $userID ) : boolean | ||
$discussion | object | array | integer | The discussion ID or the discussion to test. |
$userID | integer | The ID of the user to test permission for. If empty, it defaults to Session user. |
return | boolean | Whether the user can view the discussion. |