OEModule\OphCoMessaging\controllers\DefaultController::isIntendedRecipient PHP Метод

isIntendedRecipient() защищенный Метод

Determine if the given user (or current if none given) is the intended recipient of the message that is being viewed.
protected isIntendedRecipient ( OEWebUser $user = null ) : boolean
$user OEWebUser
Результат boolean
    protected function isIntendedRecipient(\OEWebUser $user = null)
    {
        if (is_null($user)) {
            $user = \Yii::app()->user;
        }
        if ($el = $this->getMessageElement()) {
            if ($el->for_the_attention_of_user_id == $user->getId()) {
                return true;
            }
        }
        return false;
    }