diff --git a/frontend/classes/class.user.php b/frontend/classes/class.user.php index a8d6a9d..668f2be 100644 --- a/frontend/classes/class.user.php +++ b/frontend/classes/class.user.php @@ -74,4 +74,16 @@ class User extends CPHPDatabaseRecordClass return false; } } + + public function RequireAccessLevel($level) + { + if($this->sAccessLevel < $level) + { + throw new InsufficientAccessLevelException("You do not have the required access level to perform this action."); + } + else + { + return true; + } + } }