searching for user by username now works

This commit is contained in:
2013-01-23 21:03:04 -05:00
parent ffb6961fe0
commit 1198333412
+6 -2
View File
@@ -58,8 +58,12 @@ namespace MileageTraker.Web.Controllers
var user = DataService.FindUserByFullName(employeeName); var user = DataService.FindUserByFullName(employeeName);
if (user == null) if (user == null)
{ {
TempData["StatusMessage"] = "User " + employeeName + " not found"; user = DataService.FindUserByUsername(employeeName);
return RedirectToAction("Index"); if (user == null)
{
TempData["StatusMessage"] = "User " + employeeName + " not found";
return RedirectToAction("Index");
}
} }
return View("Details", user); return View("Details", user);
} }