(bug 17352) Improve review UI with regards to blocks
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 4 Feb 2009 18:23:26 +0000 (18:23 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 4 Feb 2009 18:23:26 +0000 (18:23 +0000)
includes/User.php

index e0289f8..c067d2b 100644 (file)
@@ -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!