aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/users.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index c3ad2abfd..9b8594a93 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -155,6 +155,27 @@
return parent::delete();
+ }
+
+ /**
+ * Ban this user.
+ *
+ * @param string $reason Optional reason
+ */
+ public function ban($reason = "")
+ {
+ if (disable_user_entities($this->guid))
+ return $this->disable($reason);
+
+ return false;
+ }
+
+ /**
+ * Unban this user.
+ */
+ public function unban()
+ {
+ return enable_entity($this->guid);
}
/**