public static function is_blocked(int $userid, int $blockeduserid) : bool {
        global $DB;

        return $DB->record_exists('message_users_blocked', ['userid' => $userid, 'blockeduserid' => $blockeduserid]);
    }
public static function is_blocked(int $userid, int $blockeduserid) : bool {
        global $DB;

        return $DB->record_exists('message_users_blocked', ['userid' => $userid, 'blockeduserid' => $blockeduserid]);
    }
public static function is_blocked ( int $ userid , int $ blockeduserid ) : bool { global $ DB ; return $ DB -> record_exists ( 'message_users_blocked' , [ 'userid' => $ userid , 'blockeduserid' => $ blockeduserid ] ) ; }
Checks if a user is already blocked.

@param int $userid
@param int $blockeduserid
@return bool Returns true if they are a blocked, false otherwise
Checks if a user is already blocked .