
Backend/Func/CheckReadProtected.pm - Read Protection
This function checks whether or not the specified user can view a thread, according to the read protection options.
my $bool = $self->CheckReadProtected($userdetails_object, $rpd_flag);
Example
my $gtid = $self->_param('gtid');
my $thread = # ... get thread info from database
my $is_protected = $self->CheckReadProtected($self->{userdetails}, $thread->{$gtid}->{rpd});
if ($is_protected) {
# User cannot view this thread.
}
|