public ActionResult UserDetails(string buddyEmail = "", Person buddy = null) { var user = new UserViewModel(); var person = new Person(); if (buddy.Email == null || buddy.Email == "You don't seem to have any friends using CocoaDuck\n. Why don't you recommend it..." || buddy.Email == "Sorry, we could not find your friend :(") { person = PersonRepository.GetPersonByEmail(User.Identity.Name); ViewBag.message = buddy.Email; } else { ViewBag.message = "Friend's page"; person = PersonRepository.GetPersonByEmail(buddy.Email); } user.CastPersonToUser(person); return(View(user)); }