+ /**
+ * @return bool Whether this user is flagged as being a bot role account
+ * @since 1.28
+ */
+ public function isBot() {
+ $isBot = false;
+ if ( !Hooks::run( "UserIsBot", [ $this, &$isBot ] ) ) {
+ return $isBot;
+ }
+
+ return ( $isBot || in_array( 'bot', $this->getGroups() ) );
+ }
+