Class TLogin

Description

TLogin class.

Provides user interface (UI) elements for logging in to a Web site..

The TLogin control is a composite control that provides all the common UI elements needed to authenticate a user on a Web site. The following three elements are required for all login scenarios: A unique user name to identify the user. A password to verify the identity of the user. A login button to send the login information to the server. The TLogin control also provides the following optional UI elements that support additional functions: A link for a password reminder. A Remember Me checkbox for retaining the login information between sessions. A Help link for users who are having trouble logging in. A Register New User link that redirects users to a registration page. Instruction text that appears on the login form. Custom error text that appears when the user clicks the login button without filling in the user name or password fields. Custom error text that appears if the login fails. A custom action that occurs when login succeeds. A way to hide the login control if the user is already logged in to the site.

The TLogin control uses a membership provider to obtain user credentials. Unless you specify otherwise, the TLogin control uses the default membership provider defined in the Web.config file. To specify a different provider, set the MembershipProvider property to one of the membership provider names defined in your application's Web.config file. For more information, see Membership Providers.

If you want to use a custom authentication service, you can use the OnAuthenticate method to call the service.

Styles and Templates The appearance of the Login control is fully customizable through templates and style settings. All UI text messages are also customizable through properties of the TLogin class. The default interface text is automatically localized based on the locale setting on the server.

If the TLogin control is customized with templates, then the AccessKey property and the TabIndex property are ignored. In this case, set the AccessKey property and the TabIndex property of each template child control directly.

TLogin control properties represented by text boxes, such as UserName and Password, are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the TextChanged event triggered by the textboxes.

The following table lists the Login control style properties and explains which UI element each style property affects. For a list of which properties each style applies to, see the documentation for the individual style properties.

Style property UI element affected BorderPadding The space between the control contents and the control's border. CheckBoxStyle Remember Me checkbox. FailureTextStyle Login failure text. InstructionTextStyle Instructional text on the page that tells users how to use the control. LabelStyle Labels for all input fields, such as text boxes. TextBoxStyle Text entry input fields. TitleTextStyle Title text. ValidatorTextStyle Text displayed to the user when a login attempt is unsuccessful due to validation errors HyperLinkStyle Links to other pages. LoginButtonStyle Login button.

Validation Groupings The UserName and Password properties have RequiredFieldValidator controls associated with them to prevent users from submitting the page without providing required information.

The TLogin control uses a validation group so that other fields on the same page as the TLogin control can be validated separately. By default, the ID property of the Login control is used as the name of the validation group. For example, a TLogin control with the ID "Login1" will use a validation group name of "Login1". If you want to set the validation group that the TLogin control is part of, you must template the control and change the validation group name.

  • since: 3.1
  • version: $Id: TLogin.php 1398 2006-09-08 19:31:03Z xue $
  • author: Jason Ragsdale <jrags@jasrags.net>

Located in /Web/UI/WebControls/TLogin.php (line 83)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TCompositeControl
            |
            --TLogin
Method Summary
void getFailureText ()
void getHelpPageText ()
void getHelpPageUrl ()
void getLabelStyle ()
void getOrientation ()
void getPassword ()
void getTagKey ()
void getTextBoxStyle ()
void getTextLayout ()
void getTitleText ()
void getUserName ()
void onAuthenticate (mixed $param)
void onBubbleEvent (mixed $sender, mixed $param)
void onLoggedIn (mixed $param)
void onLoggingIn (mixed $param)
void onLoginError (mixed $param)
void onPreRender (mixed $param)
void render (mixed $writer)
void setBorderPadding (mixed $value)
void setCreateUserIconUrl (mixed $value)
void setCreateUserText (mixed $value)
void setCreateUserUrl (mixed $value)
void setDestinationPageUrl (mixed $value)
void setDisplayRememberMe (mixed $value)
void setFailureAction (mixed $value)
void setFailureText (mixed $value)
void setHelpPageIconUrl (mixed $value)
void setHelpPageText (mixed $value)
void setHelpPageUrl (mixed $value)
void setInstructionText (mixed $value)
void setLayoutTemplate (mixed $value)
void setLoginButtonImageUrl (mixed $value)
void setLoginButtonText (mixed $value)
void setLoginButtonType (mixed $value)
void setMembershipProvider (mixed $value)
void setOrientation (mixed $value)
void setPasswordLabelText (mixed $value)
void setPasswordRecoveryIconUrl (mixed $value)
void setPasswordRecoveryText (mixed $value)
void setPasswordRecoveryUrl (mixed $value)
void setPasswordRequiredErrorMessage (mixed $value)
void setRememberMeSet (mixed $value)
void setRememberMeText (mixed $value)
void setTextLayout (mixed $value)
void setTitleText (mixed $value)
void setUserName (mixed $value)
void setUserNameLabelText (mixed $value)
void setUserNameRequiredErrorMessage (mixed $value)
void setVisibleWhenLoggedIn (mixed $value)
Methods
createChildControls (line 567)
  • access: public
void createChildControls ()

Redefinition of:
TControl::createChildControls()
Creates child controls.
getBorderPadding (line 103)
  • access: public
void getBorderPadding ()
getCheckBoxStyle (line 111)
  • access: public
void getCheckBoxStyle ()
getConvertingToTemplate (line 115)
  • access: public
void getConvertingToTemplate ()
getCreateUserIconUrl (line 119)
  • access: public
void getCreateUserIconUrl ()
getCreateUserText (line 127)
  • access: public
void getCreateUserText ()
getCreateUserUrl (line 135)
  • access: public
void getCreateUserUrl ()
getDestinationPageUrl (line 143)
  • access: public
void getDestinationPageUrl ()
getDisplayRememberMe (line 151)
  • access: public
void getDisplayRememberMe ()
getFailureAction (line 159)
  • access: public
void getFailureAction ()
getFailureText (line 167)
  • access: public
void getFailureText ()
getFailureTextStyle (line 175)
  • access: public
void getFailureTextStyle ()
getHelpPageIconUrl (line 179)
  • access: public
void getHelpPageIconUrl ()
getHelpPageText (line 187)
  • access: public
void getHelpPageText ()
getHelpPageUrl (line 195)
  • access: public
void getHelpPageUrl ()
getHyperLinkStyle (line 203)
  • access: public
void getHyperLinkStyle ()
getInstructionText (line 207)
  • access: public
void getInstructionText ()
getInstructionTextStyle (line 215)
  • access: public
void getInstructionTextStyle ()
getLabelStyle (line 219)
  • access: public
void getLabelStyle ()
getLayoutTemplate (line 223)
  • access: public
void getLayoutTemplate ()
getLoginButtonImageUrl (line 232)
  • access: public
void getLoginButtonImageUrl ()
getLoginButtonStyle (line 240)
  • access: public
void getLoginButtonStyle ()
getLoginButtonText (line 244)
  • access: public
void getLoginButtonText ()
getLoginButtonType (line 252)
  • access: public
void getLoginButtonType ()
getMembershipProvider (line 260)
  • access: public
void getMembershipProvider ()
getOrientation (line 268)
  • access: public
void getOrientation ()
getPassword (line 276)
  • access: public
void getPassword ()
getPasswordInternal (line 280)
  • access: public
void getPasswordInternal ()
getPasswordLabelText (line 284)
  • access: public
void getPasswordLabelText ()
getPasswordRecoveryIconUrl (line 292)
  • access: public
void getPasswordRecoveryIconUrl ()
getPasswordRecoveryText (line 300)
  • access: public
void getPasswordRecoveryText ()
getPasswordRecoveryUrl (line 308)
  • access: public
void getPasswordRecoveryUrl ()
getPasswordRequiredErrorMessage (line 316)
  • access: public
void getPasswordRequiredErrorMessage ()
getRememberMeSet (line 324)
  • access: public
void getRememberMeSet ()
getRememberMeText (line 332)
  • access: public
void getRememberMeText ()
getTagKey (line 340)
  • access: public
void getTagKey ()
getTemplateContainer (line 344)
  • access: public
void getTemplateContainer ()
getTextBoxStyle (line 349)
  • access: public
void getTextBoxStyle ()
getTextLayout (line 353)
  • access: public
void getTextLayout ()
getTitleText (line 362)
  • access: public
void getTitleText ()
getTitleTextStyle (line 370)
  • access: public
void getTitleTextStyle ()
getUserName (line 374)
  • access: public
void getUserName ()
getUserNameInternal (line 382)
  • access: public
void getUserNameInternal ()
getUserNameLabelText (line 386)
  • access: public
void getUserNameLabelText ()
getUserNameRequiredErrorMessage (line 394)
  • access: public
void getUserNameRequiredErrorMessage ()
getValidatorTextStyle (line 402)
  • access: public
void getValidatorTextStyle ()
getVisibleWhenLoggedIn (line 406)
  • access: public
void getVisibleWhenLoggedIn ()
onAuthenticate (line 480)
  • access: public
void onAuthenticate (mixed $param)
onBubbleEvent (line 494)
  • access: public
void onBubbleEvent (mixed $sender, mixed $param)
onLoggedIn (line 509)
  • access: public
void onLoggedIn (mixed $param)
onLoggingIn (line 518)
  • access: public
void onLoggingIn (mixed $param)
onLoginError (line 527)
  • access: public
void onLoginError (mixed $param)
onPreRender (line 540)
  • access: public
void onPreRender (mixed $param)

Redefinition of:
TControl::onPreRender()
This method is invoked when the control enters 'OnPreRender' stage.
render (line 558)
  • access: public
void render (mixed $writer)

Redefinition of:
TControl::render()
Renders the control.
setBorderPadding (line 107)
  • access: public
void setBorderPadding (mixed $value)
setChildProperties (line 582)
  • access: public
void setChildProperties ()
setCreateUserIconUrl (line 123)
  • access: public
void setCreateUserIconUrl (mixed $value)
setCreateUserText (line 131)
  • access: public
void setCreateUserText (mixed $value)
setCreateUserUrl (line 139)
  • access: public
void setCreateUserUrl (mixed $value)
setDestinationPageUrl (line 147)
  • access: public
void setDestinationPageUrl (mixed $value)
setDisplayRememberMe (line 155)
  • access: public
void setDisplayRememberMe (mixed $value)
setFailureAction (line 163)
  • access: public
void setFailureAction (mixed $value)
setFailureText (line 171)
  • access: public
void setFailureText (mixed $value)
setHelpPageIconUrl (line 183)
  • access: public
void setHelpPageIconUrl (mixed $value)
setHelpPageText (line 191)
  • access: public
void setHelpPageText (mixed $value)
setHelpPageUrl (line 199)
  • access: public
void setHelpPageUrl (mixed $value)
setInstructionText (line 211)
  • access: public
void setInstructionText (mixed $value)
setLayoutTemplate (line 227)
  • access: public
void setLayoutTemplate (mixed $value)
setLoginButtonImageUrl (line 236)
  • access: public
void setLoginButtonImageUrl (mixed $value)
setLoginButtonText (line 248)
  • access: public
void setLoginButtonText (mixed $value)
setLoginButtonType (line 256)
  • access: public
void setLoginButtonType (mixed $value)
setMembershipProvider (line 264)
  • access: public
void setMembershipProvider (mixed $value)
setOrientation (line 272)
  • access: public
void setOrientation (mixed $value)
setPasswordLabelText (line 288)
  • access: public
void setPasswordLabelText (mixed $value)
setPasswordRecoveryIconUrl (line 296)
  • access: public
void setPasswordRecoveryIconUrl (mixed $value)
setPasswordRecoveryText (line 304)
  • access: public
void setPasswordRecoveryText (mixed $value)
setPasswordRecoveryUrl (line 312)
  • access: public
void setPasswordRecoveryUrl (mixed $value)
setPasswordRequiredErrorMessage (line 320)
  • access: public
void setPasswordRequiredErrorMessage (mixed $value)
setRememberMeSet (line 328)
  • access: public
void setRememberMeSet (mixed $value)
setRememberMeText (line 336)
  • access: public
void setRememberMeText (mixed $value)
setTextLayout (line 357)
  • access: public
void setTextLayout (mixed $value)
setTitleText (line 366)
  • access: public
void setTitleText (mixed $value)
setUserName (line 378)
  • access: public
void setUserName (mixed $value)
setUserNameLabelText (line 390)
  • access: public
void setUserNameLabelText (mixed $value)
setUserNameRequiredErrorMessage (line 398)
  • access: public
void setUserNameRequiredErrorMessage (mixed $value)
setVisibleWhenLoggedIn (line 410)
  • access: public
void setVisibleWhenLoggedIn (mixed $value)

Inherited Methods

Inherited From TCompositeControl

TCompositeControl::initRecursive()

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::createChildControls()
TControl::createControlCollection()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
TControl::getID()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Class Constants

Documentation generated on Sun, 14 Jan 2007 21:43:16 -0500 by phpDocumentor 1.3.0RC4