Пример #1
0
 private string GetUserType()
 {
     if (User.Identity.Name != null)
     {
         List <UserInformation> users = _securityRepository.GetUserInformation(User.Identity.Name);
         if (users.Count > 0)
         {
             var user = users[0];
             return(user.user_type);
         }
     }
     return("");
 }
Пример #2
0
 public ActionResult Index(string apiInformation)
 {
     ViewData["user"]       = null;
     ViewData["customerId"] = null;
     if (User.Identity.Name != null)
     {
         List <UserInformation> users = _securityRepository.GetUserInformation(User.Identity.Name);
         if (users.Count > 0)
         {
             ViewData["user"]       = users[0];
             ViewData["customerId"] = users[0].customerId;
         }
     }
     if (string.IsNullOrEmpty(apiInformation))
     {
         return(View());
     }
     else
     {
         var result = _securityRepository.ConfirmUserName(apiInformation);
         ViewData["result"] = string.IsNullOrEmpty(result) ? string.Empty : "Account confirmed!";
         return(View());
     }
 }