admin
-
2/24/2006 4:28:12 PM
Re: modifying the LogonForm
Hello,
thank you for your message. Unfortunately, the design of the logon form is not very configurable. However, you could do that perhaps with CSS positioning like this:
.LogonFormUserNameLabel { position:relative; left: 100px; top: -20px; }
Alternatively, you could create your own logon form - the only thing you need to do is to run code like this:
TreeProvider tree = Functions.GetTreeProvider(); object[,] paramsIdent = new object[ 1, 3 ]; if ( tree.SecurityProvider.AuthenticateUser( mUserNameTextBox.Text.Trim(), mPasswordTextBox.Text ) == AuthenticationResultEnum.OK ) { // get userid and set it to the session("CMSUserID") value paramsIdent[ 0, 0 ] = "@UserName"; paramsIdent[ 0, 1 ] = mUserNameTextBox.Text.Trim(); System.Web.HttpContext.Current.Session[ "CMSUserID" ] = tree.Connection.ExecuteQuery( "cms.user.selectbyusername", paramsIdent ).Tables[ 0 ].Rows[ 0 ][ "UserID" ]; // redirect user FormsAuthentication.RedirectFromLoginPage( mUserNameTextBox.Text.Trim(), mRememberCheckBox.Checked ); }
else
{ //logon failed }
Best Regards,
|