Jump to content

Extension:UserTools

From mediawiki.org
Revision as of 22:12, 3 July 2011 by Royce (talk | contribs) (spelling fix, standardize on plural for consistency)

(($disable$))

MediaWiki extensions manual
UserTools
Release status: beta
Implementation Extended syntax
Author(s) Jean-Lou Dupont
Latest version 1.1.0
MediaWiki 1.10, 1.11
License No license specified
Download SVN
See SVN ($Id: UserTools.doc.wikitext 762 2007-12-14 15:20:18Z jeanlou.dupont $)

Purpose

Provides secure parser functions to retrieve user related information.

Usage

This extension is really meant to be used with Extension:ParserPhase2.

User options

  • E.g. (($#cusergetoption|email|default$))
    • Get the current user's email option
  • E.g. (($#usergetoption|user id or name|email|default$))
    • Get the specified user's email option IFF the current has the 'userdetails' right

User Group Membership

  • {{#cuserfromgroup:group-to-look-for|trueValue|falseValue}}
    • trueValue is returned if current user is part of group
    • falseValue is returned if current user is not part of group

Similar to #cuserfromgroup:

  • {{#userfromgroup:username-OR-user-id|group-to-look-for|trueValue|falseValue}}
    • Either a username or user id must be supplied

Features

  • Options are categorized as either 'RESTRICTED' or 'UNRESTRICTED' for privacy reasons
    • User must have the userdetails right to access 'RESTRICTED' options
    • Also, the current user must have the userdetails to view some other user's group membership

Dependencies

Template:Pear

History

Release Notes
1.1.0 Addition of #cuserfromgroup and #userfromgroup