Trust Level System
OForum calculates trust levels per user, managed by OForum_Trust::recalculate( int $user_id ).
| Level | Name | Default thresholds |
|---|---|---|
| 0 | New Member | Default (just registered) |
| 1 | Basic | 1+ posts, account 1+ day old |
| 2 | Member | 10+ posts, 7+ days old |
| 3 | Regular | 50+ posts, 30+ days old |
Thresholds are configurable in OForum → Settings → Trust Thresholds. Trust level gates who can create threads, post replies, attach media, and view restricted rooms.
Moderation
Report queue — any user can flag a post. Flagged content appears in Moderation tab with pending badge count.
Shadow ban — user's posts are visible only to themselves and admins. Managed by OForum_Moderation::shadow_ban( int $user_id ).
IP ban — blocks a specific IP from posting. Stored in the moderation table.
Audit log — all moderation actions (ban, unban, delete, pin, close) are logged with moderator ID and timestamp.
OForum_Permissions PHP API
php// Check whether a user can post in a room
OForum_Permissions::can_post( int $user_id, int $room_id ): bool
// Check whether a user can moderate
OForum_Permissions::can_moderate( int $user_id ): bool
// Check whether an IP is banned
OForum_Permissions::is_ip_banned( string $ip ): bool
// Get user trust level
OForum_Trust::get_level( int $user_id ): int
// Recalculate trust level
OForum_Trust::recalculate( int $user_id ): int