|
Wt
3.2.0
|
A registration widget. More...
#include <Wt/Auth/RegistrationWidget>

Public Member Functions | |
| RegistrationWidget (const AuthService &baseAuth, AbstractUserDatabase &users, Login &login, AuthWidget *authWidget=0) | |
| Constructor. | |
| RegistrationModel * | model () const |
| Returns the registration model. | |
| void | update () |
| Updates the user-interface. | |
Protected Member Functions | |
| virtual bool | validate () |
| Validates the current information. | |
| virtual void | doRegister () |
| Performs the registration. | |
| virtual void | close () |
| Closes the registration widget. | |
| virtual void | registerUserDetails (User &user) |
| Registers more user information. | |
A registration widget.
This implements a widget which allows a new user to register. The widget renders the "Wt.Auth.template.registration" template. and uses a RegistrationModel for the actual registration logic.
Typically, you may want to specialize this widget to ask for other information.
| Wt::Auth::RegistrationWidget::RegistrationWidget | ( | const AuthService & | baseAuth, |
| AbstractUserDatabase & | users, | ||
| Login & | login, | ||
| AuthWidget * | authWidget = 0 |
||
| ) |
Constructor.
Creates a new authentication widget which uses the authentication service in baseAuth, and the user database users.
Successful registration also results in a login, which is indicated to the rest of the application using a login object.
Authentication methods should be configured using addPasswordAuth() and addOAuth().
| void Wt::Auth::RegistrationWidget::close | ( | ) | [protected, virtual] |
Closes the registration widget.
The default implementation simply deletes the widget.
| void Wt::Auth::RegistrationWidget::doRegister | ( | ) | [protected, virtual] |
Performs the registration.
The default implementation checks if the information is valid with validate(), and then calls RegistrationModel::doRegister(). If registration was successful, it calls registerUserDetails() and subsequently logs the user in.
| RegistrationModel* Wt::Auth::RegistrationWidget::model | ( | ) | const |
Returns the registration model.
This returns the model that is used by the widget to do the actual registration.
| void Wt::Auth::RegistrationWidget::registerUserDetails | ( | User & | user | ) | [protected, virtual] |
Registers more user information.
This method is called when a new user has been successfully registered.
You may want to reimplement this method if you've added other information to the registration form which needs to be annotated to the user.
| void Wt::Auth::RegistrationWidget::update | ( | ) |
Updates the user-interface.
This updates the user-interface to reflect the current state of the model.
| bool Wt::Auth::RegistrationWidget::validate | ( | ) | [protected, virtual] |
Validates the current information.
The default implementation simply calls RegistrationModel::validate() on the model.
You may want to reimplement this method if you've added other information to the registration form that need validation.
1.7.5.1