@{ Layout = null;}@model Tuple< LoginViewModel,RegisterViewModel,ResetPasswordViewModel> <div id="log_in_container" class="log_in"> <div class="content"> <div class="modes"> <i class="fa-solid fa-moon"></i> <i class="fa-solid fa-sun"></i> </div> <img class="site_logo" onclick="location.href='../index.html'" src="../assets/FITB_Game_logo.png" alt="FITB Game logo" /> <form method="post" asp-action="Login" class="form" asp-route-returnUrl="@Context.Request.Query["ReturnUrl"]"> <div class="input_box"> <input asp-for="Item1.UserName" type="text" required /> <i>İstifadəçi Adı</i> </div> <div class="input_box"> <input asp-for="Item1.Password" type="password" required /> <i>Şifrə</i> </div> <div class="sign_in_links"> <a id="forgot_password" asp-controller="Account" asp-action="ForgotPassword">Şifrənizi unutmusunuz?</a> <div> <a id="sign_up" asp-controller="Account" asp-action="Register">Qeydiyyatdan keçin</a> <i class="fa-solid fa-caret-right"></i> </div> </div> <div class="input_box"> <button type="submit" value="Daxil ol"> Daxil ol </button> </div> </form> </div> </div>
[HttpGet] public async Task<IActionResult> Profile(string id) { var user = await _userManager.FindByIdAsync(id); var model = new ProfileViewModel { Id = user.Id, FirstName = user.FirstName, LastName = user.LastName, Email = user.Email, UserName = user.UserName, ImagePath = user.ImagePath }; var roles = await _userManager.GetRolesAsync(user); if (roles.Any()) model.Role = roles[0]; return View(model); }