only anonymous need an user name

This commit is contained in:
2016-11-01 23:21:03 +01:00
parent 78d91658fb
commit b75c5c7839
2 changed files with 61 additions and 8 deletions

View File

@ -51,10 +51,11 @@ namespace Yavsc.Controllers
public ActionResult Chat()
{
if (User.Identity.IsAuthenticated) {
ViewBag.IsAuthenticated=true;
string uid = User.GetUserId();
ViewBag.Contacts = DbContext.Contacts.Where(c=>c.OwnerId == uid)
;
}
} else ViewBag.IsAuthenticated=false;
return View();
}