NotificationTarget::validateSendTo PHP Method

validateSendTo() public method

Validate send before doing it (may be overloaded : exemple for private tasks or followups)
public validateSendTo ( $event, array $infos, $notify_me = false ) : true
$event string notification event
$infos array array of destination of the notification
$notify_me boolean notify me on my action ? ($infos contains users_id to check if the target is me) (false by default)
return true
    function validateSendTo($event, array $infos, $notify_me = false)
    {
        if (!$notify_me) {
            if (isset($infos['users_id']) && $infos['users_id'] === Session::getLoginUserID(false)) {
                return false;
            }
        }
        return true;
    }