/User/name/ url support

main
Inga 🏳‍🌈 14 years ago
parent 8cb8d49b2d
commit 508e9af467
  1. 2
      Builder/IISMainHandler/build.txt
  2. 10
      IISMainHandler/handlers/response/UserInfoHandler.cs

@ -21,7 +21,15 @@ namespace FLocal.IISHandler.handlers.response {
} }
override protected IEnumerable<XElement> getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
User user = User.LoadById(int.Parse(context.requestParts[1])); User user;
{
int userId;
if(int.TryParse(context.requestParts[1], out userId)) {
user = User.LoadById(userId);
} else {
user = User.LoadByName(context.requestParts[1]);
}
}
Account account = null; Account account = null;
if(context.session != null) { if(context.session != null) {
try { try {

Loading…
Cancel
Save