m (Text replacement - "{{Doc properties" to "{{Csp class properties")
 
(14 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
Using a form to register a new user in the Wiki
 
Using a form to register a new user in the Wiki
 
===Description===
 
===Description===
_createuser is very powerfull and needs special attention. This option can create a new user in the Wiki.
+
_createuser is very powerfull and needs special attention. This option can create a new user in the Wiki. It will create a random password and send the user details to the users email address. A confirm emailaddress email will also be send.
 +
 
 +
This functionality is disabled by default and can be enabled by setting the <code>$wgFlexFormConfig['can_create_user'] = true;</code> , see [[DevOps:Doc/FlexForm/1.0/Installation_of_FlexForm]].
 
===Parameters===
 
===Parameters===
 
'''_createuser'''
 
'''_createuser'''
  
'''username''' = [mandetory] The new username to be registered
+
'''username''' = [mandatory] The new username to be registered
  
'''email''' = [mandetory] The email address of the new user
+
'''email''' = [mandatory] The email address of the new user
  
 
'''realname''' = Optional the real name of the user
 
'''realname''' = Optional the real name of the user
Line 20: Line 22:
 
<syntaxhighlight lang="html">
 
<syntaxhighlight lang="html">
 
<_form action="addToWiki" >
 
<_form action="addToWiki" >
<_createuser username="adje" email="ad@wikibase.nl" realname="Ad Strack van Schijndel" />
+
<_createuser username="adje" email="ad@wikibase.nl" realname="Ad Strack van Schijndel" />
<_input type="submit" value="create Adje" />
+
<_input type="submit" value="create Adje" />
 
</_form>
 
</_form>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
===Note===
 
===Note===
Make sure that when using this powerfull function to have the FlexForm setting "sec" to true for more security. Furthermore, take care where you show such a form.
+
Make sure that when using this powerful function to have the FlexForm setting "secure" to true for more security. Furthermore, take care where you show such a form.
===Links===
 
https://www.mediawiki.org/wiki/Multi-Content_Revisions
 
ws-class-props
Line 1: Line 1:
 
+
{{Csp class properties
 +
|Doc subject=DevOps:Doc/FlexForm
 +
|Subject version=1.1
 +
|Doc parent=DevOps:Doc/FlexForm
 +
|Doc sort order=205
 +
|Doc target group=User
 +
|Doc synopsis=Using a form to register a new user in the Wiki
 +
}}
ws-page-props
Line 1: Line 1:
{{Doc properties
+
 
|Doc subject=DevOps:Doc/FlexForm
 
|Subject version=1.0.0
 
|Doc parent=DevOps:Doc/FlexForm
 
|Doc sort order=205
 
|Doc target group=User
 
}}
 

Latest revision as of 11:00, 15 July 2025

Name

_createuser

Type

_createuser

Synopsis

Using a form to register a new user in the Wiki

Description

_createuser is very powerfull and needs special attention. This option can create a new user in the Wiki. It will create a random password and send the user details to the users email address. A confirm emailaddress email will also be send.

This functionality is disabled by default and can be enabled by setting the $wgFlexFormConfig['can_create_user'] = true; , see Installation of FlexForm.

Parameters

_createuser

username = [mandatory] The new username to be registered

email = [mandatory] The email address of the new user

realname = Optional the real name of the user

Example

Create a new user with username adje

<_form action="addToWiki" >
	<_createuser username="adje" email="ad@wikibase.nl" realname="Ad Strack van Schijndel" />
	<_input type="submit" value="create Adje" />
</_form>

Note

Make sure that when using this powerful function to have the FlexForm setting "secure" to true for more security. Furthermore, take care where you show such a form.