Error compiling template "Designs/australis/UserManagement/Login/ImpersonationLogin.cshtml" Line 25: 'Dynamicweb.Security.UserManagement.User' does not contain a definition for 'UserID' and no extension method 'UserID' accepting a first argument of type 'Dynamicweb.Security.UserManagement.User' could be found (are you missing a using directive or an assembly reference?)
1 @if (Pageview.User.UserID == 0) { 2 3 <h3>Customer login</h3> 4 <div class="login-box-mode" data-login-box-mode="login"> 5 @if (!string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["username"]) || !string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["password"])) { 6 <div class="loginbox-login-failed alert alert-error">Invalid username or password</div> 7 } 8 9 <form class="form-horizontal" method="post"> 10 <div class="control-group"> 11 <input type="text" id="login-username" name="username" spellcheck="false" placeholder="Username" value='@System.Web.HttpContext.Current.Request["username"]'/> 12 </div> 13 <div class="control-group"> 14 <input type="password" id="login-password" name="password" placeholder="Password" value='@System.Web.HttpContext.Current.Request["password"]'/> 15 </div> 16 <input type="submit" value="Login" /> 17 </form> 18 </div> 19 } else { 20 21 @: Logged in as @Pageview.User.UserName 22 <br /> 23 <br /> 24 25 <form method="post"> 26 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { 27 <table border="0"> 28 <tr> 29 <td>Select user to impersonate</td> 30 </tr> 31 <tr> 32 <td> 33 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector"> 34 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { 35 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 36 } 37 </select> 38 </td> 39 </tr> 40 <tr> 41 <td colspan="2"><input type="submit" tabindex="3" value="OK"></td> 42 </tr> 43 </table> 44 } else { 45 <h3>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName") is impersonated by @Pageview.User.UserName.</h3> 46 <br /> 47 <input type="submit" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 48 } 49 <br /> 50 <br /> 51 52 <a class="btn" href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID">Logout</a> 53 54 55 56 57 </form> 58 } 59