MWX/Invite

From Woozle Writes Code
< MWX
Jump to navigation Jump to search
MediaWiki extension: Special:Invite

About

Special:Invite is a MediaWiki extension to selectively allow self-registration on wikis where new accounts must normally be created by admins.

The extension allows an authorized user (anyone with permission to create user accounts) to create one or more "invite codes". An "invite code" is a short string that can distributed in semi-private contexts (making it unlikely that spammers would find it), and that may have starting and ending validity dates in order to limit its spread. Unlike the invites in Extension:InviteSignup, an invite code may be used multiple times.

When anyone enters a valid invite code, they will be allowed to create an account -- even if they do not normally have access to that ability. If the code has expired or is not yet active, they will not be allowed to create an account (unless they have that permission via other means).

The extension provides a form for administering invite codes and another one for visitors to type them in; the former is only displayed to authorized users.

Future

Planned features:

  • automatically add users to pre-selected security groups, depending on what invite code they use
  • limit the number of uses of a given invite code (probably best done using db for storage instead of a file)
  • admin interface to display information about invite-code usage (who, when, client details; show failed invite-usage attempts)

Pages

  • GitLab: source/install code
  • /notes: The hardest part of this has proved to be interfacing with the MW API.