diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-08 15:28:56 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-08 15:28:56 +0000 |
commit | 6955e992dbbc5a6e4a1844fa30475aacf6262701 (patch) | |
tree | b38171042a354bba440ac730fe79733ee0100296 /engine/lib | |
parent | 50606888ddaa348bdabcd1e735eed55e26ff9c75 (diff) | |
download | elgg-6955e992dbbc5a6e4a1844fa30475aacf6262701.tar.gz elgg-6955e992dbbc5a6e4a1844fa30475aacf6262701.tar.bz2 |
Refs #668, #640: Cleaner interface provided for banning.
git-svn-id: https://code.elgg.org/elgg/trunk@2546 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/users.php | 21 |
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); }
/**
|