diff options
author | Adam Frisby | 2007-06-09 01:40:11 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-09 01:40:11 +0000 |
commit | 2b986dd0095cb1ef7294ecf27c1fc6ad1f2ae451 (patch) | |
tree | 74fc4d26c37d111fd7ba8912bc2e101c23a63326 | |
parent | Patched up error handling to return a better XML string. (diff) | |
download | opensim-SC-2b986dd0095cb1ef7294ecf27c1fc6ad1f2ae451.zip opensim-SC-2b986dd0095cb1ef7294ecf27c1fc6ad1f2ae451.tar.gz opensim-SC-2b986dd0095cb1ef7294ecf27c1fc6ad1f2ae451.tar.bz2 opensim-SC-2b986dd0095cb1ef7294ecf27c1fc6ad1f2ae451.tar.xz |
* Added more support for wider profile information from get user REST calls.
* Added comments and stuff
-rw-r--r-- | OpenGridServices/OpenGridServices.UserServer/UserManager.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs index b8c9f97..f378c32 100644 --- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs +++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs | |||
@@ -655,6 +655,10 @@ namespace OpenGridServices.UserServer | |||
655 | return "OK"; | 655 | return "OK"; |
656 | } | 656 | } |
657 | 657 | ||
658 | /// <summary> | ||
659 | /// Returns an error message that the user could not be found in the database | ||
660 | /// </summary> | ||
661 | /// <returns>XML string consisting of a error element containing individual error(s)</returns> | ||
658 | public string CreateUnknownUserErrorResponse() | 662 | public string CreateUnknownUserErrorResponse() |
659 | { | 663 | { |
660 | System.IO.StringWriter sw = new System.IO.StringWriter(); | 664 | System.IO.StringWriter sw = new System.IO.StringWriter(); |
@@ -697,11 +701,27 @@ namespace OpenGridServices.UserServer | |||
697 | 701 | ||
698 | // User | 702 | // User |
699 | xw.WriteStartElement("user"); | 703 | xw.WriteStartElement("user"); |
704 | // Account information | ||
700 | xw.WriteAttributeString("firstname", profile.username); | 705 | xw.WriteAttributeString("firstname", profile.username); |
701 | xw.WriteAttributeString("lastname", profile.surname); | 706 | xw.WriteAttributeString("lastname", profile.surname); |
702 | xw.WriteAttributeString("uuid", profile.UUID.ToStringHyphenated()); | 707 | xw.WriteAttributeString("uuid", profile.UUID.ToStringHyphenated()); |
703 | xw.WriteAttributeString("inventory", profile.userInventoryURI); | 708 | // Server Information |
704 | xw.WriteAttributeString("asset", profile.userAssetURI); | 709 | xw.WriteAttributeString("server_inventory", profile.userInventoryURI); |
710 | xw.WriteAttributeString("server_asset", profile.userAssetURI); | ||
711 | // Profile Information | ||
712 | xw.WriteAttributeString("profile_about", profile.profileAboutText); | ||
713 | xw.WriteAttributeString("profile_firstlife_about", profile.profileFirstText); | ||
714 | xw.WriteAttributeString("profile_firstlife_image", profile.profileFirstImage.ToStringHyphenated()); | ||
715 | xw.WriteAttributeString("profile_can_do", profile.profileCanDoMask.ToString()); | ||
716 | xw.WriteAttributeString("profile_want_do", profile.profileWantDoMask()); | ||
717 | xw.WriteAttributeString("profile_image", profile.profileImage.ToStringHyphenated()); | ||
718 | xw.WriteAttributeString("profile_created",profile.created.ToString(); | ||
719 | xw.WriteAttributeString("profile_lastlogin",profile.lastLogin.ToString()); | ||
720 | // Home region information | ||
721 | xw.WriteAttributeString("home_coordinates", profile.homeLocation.ToString()); | ||
722 | xw.WriteAttributeString("home_region", profile.homeRegion.ToString()); | ||
723 | xw.WriteAttributeString("home_look", profile.homeLookAt()); | ||
724 | |||
705 | xw.WriteEndElement(); | 725 | xw.WriteEndElement(); |
706 | 726 | ||
707 | // Footer | 727 | // Footer |