[Turn on line numbering]
arg name, password, email, @type;
var user;
if (!(| caller() == $login_interface |) && type((| .perms(sender(), 'system) |)) == 'error)
throw(~perm, "Caller and Sender are not allowed to call this method.");
[(type ?= 'new_user_class)] = type;
catch any {
user = starting[type].spawn(name);
user.set_name(name);
if (type == 'new_user_class)
user.set_password(password);
user.change_manager(user);
user.set_user_info("rl-email", $user_info, email);
} with {
// Failed to initialize the child; destroy it.
(| user.destroy() |);
rethrow(error());
}
return user;
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]