mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Mantis#2660. Thank you kindly, Ruud Lathrop for a patch that:
This patch adds the option of adding the email when you create a new user. This works in Gridmode as none Gridmode. This option is also added to RemoteAdminPlugin. With a new handler you can create a user with a email.
This commit is contained in:
@@ -255,14 +255,15 @@ namespace OpenSim.Framework.Communications
|
||||
/// <param name="firstName"></param>
|
||||
/// <param name="lastName"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="email"></param>
|
||||
/// <param name="regX"></param>
|
||||
/// <param name="regY"></param>
|
||||
/// <returns>The UUID of the added user. Returns UUID.Zero if the add was unsuccessful</returns>
|
||||
public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY)
|
||||
public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY)
|
||||
{
|
||||
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
|
||||
|
||||
m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
|
||||
m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY);
|
||||
UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
|
||||
if (userProf == null)
|
||||
{
|
||||
@@ -276,11 +277,22 @@ namespace OpenSim.Framework.Communications
|
||||
}
|
||||
}
|
||||
|
||||
public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY, UUID SetUUID)
|
||||
/// <summary>
|
||||
/// Adds the user.
|
||||
/// </summary>
|
||||
/// <param name="firstName">The first name.</param>
|
||||
/// <param name="lastName">The last name.</param>
|
||||
/// <param name="password">The password.</param>
|
||||
/// <param name="email">The email.</param>
|
||||
/// <param name="regX">The reg X.</param>
|
||||
/// <param name="regY">The reg Y.</param>
|
||||
/// <param name="SetUUID">The set UUID.</param>
|
||||
/// <returns></returns>
|
||||
public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
|
||||
{
|
||||
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
|
||||
|
||||
m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY, SetUUID);
|
||||
m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY, SetUUID);
|
||||
UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
|
||||
if (userProf == null)
|
||||
{
|
||||
|
||||
@@ -35,15 +35,15 @@ namespace OpenSim.Framework.Communications
|
||||
/// <summary>
|
||||
/// Loads a user profile by name
|
||||
/// </summary>
|
||||
/// <param name="fname">First name</param>
|
||||
/// <param name="lname">Last name</param>
|
||||
/// <param name="firstName">First name</param>
|
||||
/// <param name="lastName">Last name</param>
|
||||
/// <returns>A user profile. Returns null if no profile is found</returns>
|
||||
UserProfileData GetUserProfile(string firstName, string lastName);
|
||||
|
||||
/// <summary>
|
||||
/// Loads a user profile from a database by UUID
|
||||
/// </summary>
|
||||
/// <param name="uuid">The target UUID</param>
|
||||
/// <param name="userId">The target UUID</param>
|
||||
/// <returns>A user profile. Returns null if no user profile is found.</returns>
|
||||
UserProfileData GetUserProfile(UUID userId);
|
||||
|
||||
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.Communications
|
||||
/// <summary>
|
||||
/// Logs off a user on the user server
|
||||
/// </summary>
|
||||
/// <param name="UserID">UUID of the user</param>
|
||||
/// <param name="regionID">UUID of the Region</param>
|
||||
/// <param name="userid">UUID of the user</param>
|
||||
/// <param name="regionid">UUID of the Region</param>
|
||||
/// <param name="regionhandle">regionhandle</param>
|
||||
/// <param name="position">final position</param>
|
||||
/// <param name="lookat">final lookat</param>
|
||||
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Communications
|
||||
/// <summary>
|
||||
/// Logs off a user on the user server (deprecated as of 2008-08-27)
|
||||
/// </summary>
|
||||
/// <param name="UserID">UUID of the user</param>
|
||||
/// <param name="regionID">UUID of the Region</param>
|
||||
/// <param name="userid">UUID of the user</param>
|
||||
/// <param name="regionid">UUID of the Region</param>
|
||||
/// <param name="regionhandle">regionhandle</param>
|
||||
/// <param name="posx">final position x</param>
|
||||
/// <param name="posy">final position y</param>
|
||||
@@ -118,7 +118,8 @@ namespace OpenSim.Framework.Communications
|
||||
/// Updates the current region the User is in
|
||||
/// </summary>
|
||||
/// <param name="avatarid">User Region the Avatar is IN</param>
|
||||
/// <param name="retionuuid">User Region the Avatar is IN</param>
|
||||
/// <param name="regionuuid">User Region the Avatar is IN</param>
|
||||
/// <param name="regionhandle">User region handle</param>
|
||||
void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -30,15 +30,31 @@ using OpenMetaverse;
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
public interface IUserServiceAdmin
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a new user profile
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
|
||||
/// <param name="firstName">The first name.</param>
|
||||
/// <param name="lastName">The last name.</param>
|
||||
/// <param name="pass">password of avatar</param>
|
||||
/// <param name="email">email of user</param>
|
||||
/// <param name="regX">region X.</param>
|
||||
/// <param name="regY">region Y.</param>
|
||||
/// <returns></returns>
|
||||
UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY);
|
||||
|
||||
// Adds one for allowing setting of the UUID from modules.. SHOULD ONLY BE USED in very special circumstances!
|
||||
UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID setUUID);
|
||||
/// <summary>
|
||||
/// Adds one for allowing setting of the UUID from modules.. SHOULD ONLY BE USED in very special circumstances!
|
||||
/// </summary>
|
||||
/// <param name="firstName">The first name.</param>
|
||||
/// <param name="lastName">The last name.</param>
|
||||
/// <param name="pass">password of avatar</param>
|
||||
/// <param name="email">email of user</param>
|
||||
/// <param name="regX">region X.</param>
|
||||
/// <param name="regY">region Y.</param>
|
||||
/// <param name="setUUID">The set UUID.</param>
|
||||
/// <returns></returns>
|
||||
UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY, UUID setUUID);
|
||||
|
||||
/// <summary>
|
||||
/// Reset a user password
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Communications
|
||||
/// Adds a new user server plugin - user servers will be requested in the order they were loaded.
|
||||
/// </summary>
|
||||
/// <param name="provider">The filename to the user server plugin DLL</param>
|
||||
/// <param name="connect"></param>
|
||||
public void AddPlugin(string provider, string connect)
|
||||
{
|
||||
PluginLoader<IUserDataPlugin> loader =
|
||||
@@ -580,15 +581,32 @@ namespace OpenSim.Framework.Communications
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Add a new user profile
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
|
||||
/// <param name="firstName">first name.</param>
|
||||
/// <param name="lastName">last name.</param>
|
||||
/// <param name="pass">password</param>
|
||||
/// <param name="email">email.</param>
|
||||
/// <param name="regX">location X.</param>
|
||||
/// <param name="regY">location Y.</param>
|
||||
/// <returns></returns>
|
||||
public UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY)
|
||||
{
|
||||
return AddUserProfile(firstName, lastName, pass, regX, regY, UUID.Random());
|
||||
return AddUserProfile(firstName, lastName, pass, email, regX, regY, UUID.Random());
|
||||
}
|
||||
|
||||
public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY, UUID SetUUID)
|
||||
/// <summary>
|
||||
/// Adds the user profile.
|
||||
/// </summary>
|
||||
/// <param name="firstName">first name.</param>
|
||||
/// <param name="lastName">last name.</param>
|
||||
/// <param name="pass">password</param>
|
||||
/// <param name="email">email.</param>
|
||||
/// <param name="regX">location X.</param>
|
||||
/// <param name="regY">location Y.</param>
|
||||
/// <param name="SetUUID">UUID of avatar.</param>
|
||||
/// <returns></returns>
|
||||
public UUID AddUserProfile(string firstName, string lastName, string pass, string email, uint regX, uint regY, UUID SetUUID)
|
||||
{
|
||||
UserProfileData user = new UserProfileData();
|
||||
user.HomeLocation = new Vector3(128, 128, 100);
|
||||
@@ -601,6 +619,7 @@ namespace OpenSim.Framework.Communications
|
||||
user.HomeLookAt = new Vector3(100, 100, 100);
|
||||
user.HomeRegionX = regX;
|
||||
user.HomeRegionY = regY;
|
||||
user.Email = email;
|
||||
|
||||
foreach (IUserDataPlugin plugin in _plugins)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user