RemoteAdmin:admin create user

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Add lin to admin_create_user_email)
m (Lifting)
 
Line 1: Line 1:
 
'''admin_create_user''' remotely allows to create a new user
 
'''admin_create_user''' remotely allows to create a new user
 
  
 
=== Enabling admin_create_user ===
 
=== Enabling admin_create_user ===
Line 38: Line 37:
 
|
 
|
 
|}
 
|}
 
  
 
=== Optional Parameters ===
 
=== Optional Parameters ===
Line 73: Line 71:
 
|
 
|
 
|}
 
|}
 
  
 
=== Error messages ===
 
=== Error messages ===
 
''avatar_uuid'' returnes zero uuid when an error occures
 
''avatar_uuid'' returnes zero uuid when an error occures
 +
  
 
== Notes ==
 
== Notes ==
Line 85: Line 83:
 
== Example ==
 
== Example ==
 
=== C# .NET ===
 
=== C# .NET ===
 
 
This example needs the Nwc.XmlRpc library, located in your OpenSimulator bin folder.  
 
This example needs the Nwc.XmlRpc library, located in your OpenSimulator bin folder.  
  
Line 111: Line 108:
 
}
 
}
 
</source>
 
</source>
 
  
 
=== PHP ===
 
=== PHP ===
Line 130: Line 126:
 
?>
 
?>
 
</source>
 
</source>
 
 
  
 
[[Category:RemoteAdmin]]
 
[[Category:RemoteAdmin]]
 
[[Category:RemoteAdmin Commands]]
 
[[Category:RemoteAdmin Commands]]

Latest revision as of 20:11, 24 August 2021

admin_create_user remotely allows to create a new user

Contents

[edit] Enabling admin_create_user

If not all functions are enabled, use admin_create_user to enable the function in the [RemoteAdmin] section

enabled_methods = admin_create_user,...


[edit] Parameters

[edit] Required Parameters

These parameters are required

parameter Description Values
user_firstname first name of user
user_lastname last name of user
user_password password of user
start_region_x start region x position in grid
start_region_y start region y position in grid

[edit] Optional Parameters

These parameters are optional and do not need to be set

parameter Description Values
user_email email adress of user


[edit] Returned Parameters

[edit] Returned Parameters

These parameters are returned by Remote Admin

parameter Description Values
success true when successfull true, false
avatar_uuid new avatar uuid, zero uuid when error occured

[edit] Error messages

avatar_uuid returnes zero uuid when an error occures


[edit] Notes

  • This function is available for Robust and for Standalone
  • This function is the same Identical to admin_create_user_email.


[edit] Example

[edit] C# .NET

This example needs the Nwc.XmlRpc library, located in your OpenSimulator bin folder.

public void CreateUser(Uri url, string adminPassword, string firstName, string lastName, string password, string email, int regionX, int regionY)
{
 var address = Dns.GetHostEntry(url.DnsSafeHost).AddressList[0];
 var ht = new Hashtable();
 ht["password"] = adminPassword;
 ht["user_firstname"] = firstName;
 ht["user_lastname"] = lastName;
 ht["user_password"] = password;
 ht["user_email"] = email;
 ht["start_region_x"] = regionX;
 ht["start_region_y"] = regionY;
 var parameters = new List<Hashtable> { ht };
 var rpc = new XmlRpcRequest("admin_create_user", parameters);
 rpc.Invoke(url.ToString());
}
 
[Test]
public void NativeUserRegistrationTest()
{
 CreateUser(new Uri("http://yourgrid.com:9000/"), "secret", "Test2", "user2", "apassword", "email@address.com", 0, 0);
}

[edit] PHP

This example needs the RemoteAdmin PHP Class file available here.

<?php
 
// Including the RemoteAdmin PHP class.
require('RemoteAdmin.php');
 
// Instantiate the class with parameters identical to the Python example above
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');
 
// Invoke admin_create_user (multiple parameters)
$parameters = array('user_firstname' => 'John', 'user_lastname' => 'Doe', 'user_password' => 'secret', 'start_region_x' => 10000, 'start_region_y' => 10000);
$myRemoteAdmin->SendCommand('admin_create_user', $parameters);
?>
Personal tools
General
About This Wiki