);
}
- $sur = new UserrightsPage;
- $sur->setContext( $this->getContext() );
- if ( $sur->userCanExecute( $this->getUser() ) ) {
- $nav_urls['userrights'] = array(
- 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
- );
+ if ( !$user->isAnon() ) {
+ $sur = new UserrightsPage;
+ $sur->setContext( $this->getContext() );
+ if ( $sur->userCanExecute( $this->getUser() ) ) {
+ $nav_urls['userrights'] = array(
+ 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
+ );
+ }
}
}