From d6e5ae467ff5e79bf948c66b6bad51790df4ba01 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 4 Feb 2009 18:23:26 +0000 Subject: [PATCH] (bug 17352) Improve review UI with regards to blocks --- includes/User.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/User.php b/includes/User.php index e0289f8b95..c067d2bccf 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1319,6 +1319,15 @@ class User { return $this->mBlockreason; } + /** + * If user is blocked, return the ID for the block + * @return \int Block ID + */ + function getBlockId() { + $this->getBlockedStatus(); + return ($this->mBlock ? $this->mBlock->mId : false); + } + /** * Check if user is blocked on all wikis. * Do not use for actual edit permission checks! -- 2.20.1