Search these areas:
Support Forums
Product Info

DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Data Analysis
Object Model
JavaScript Objects
General Scripting Objects
Data Access Objects
File Access Objects
Http Client Objects
Security and Membership Objects
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide
The class provides methods that are used by the system page views to manage membership for your web. You can call these methods from your own script in a class or in a view.

To call one of these functions, import the class using the Classes.import() method, as you would import any DataWeb class:

var sys = Classes.import("/_classes/");

Method Description
canSignup([fSelf]) Returns True if the current user can apply to be a member of the web. If the optional fSelf argument is True, returns True only in the case where the user can sign themselves up, without having to be approved.
canRegister() Returns True if the user should be allowed to see the domain registration page.
canDesign()  Returns True if the user can design the current page.
RenderEditLink() Outputs the Edit Page link and its associated script.
LogonHref([fRoot]) Returns the HREF attribute for a logon/logoff link. If the optional fRoot argument is True, the link displayed will redirect the user to the root of the web; if False, the link will redirect the user to the page which they were attempting to access.
LogonSidebar([strRedirect], [strRedirErr ]) Shows the log-on form in a sidebar if the user is not logged in, or the log-on status form if they are logged in. The optional strRedirect argument specifies where to redirect the user after they log on. The optional strRedirErr argument specifies where to redirect the user if an error occurs when they attempt to log on.
LogonView() Outputs a log-on form.
ResetPwdView() Outputs a standard reset password view.
ChangePwdView() Outputs a standard change password view.
RegisterView([must_agree, [agree_url]]) Outputs a domain registration form.

The optional parameter must_agree is a Boolean value which defaults to TRUE; when set to FALSE the agreement checkbox and link on the registration form do not appear.

The optional parameter agree_url is a string which sets the link on the registration page.

Note that these parameters only function in a private domain. In the DataWeb domain, all users must agree, and must agree to the DataWeb member agreement.
signupMember(strEmail) Adds a member to a self-sign-up web. The strEmail argument specifies the member's email address. 
signupDecision(rowId, strAction) Handles an approval or rejection decision from the sign up approval page. Must be executed by a user with privileges to add members. The rowId argument specifies the RowId of the member candidate in the AddressBook. The strAction argument should be either "approve" or "reject". 
signupNotifyPending(strMemberEmail) Notifies web owner of pending membership applications in the AddressBook. The strMemberEmail argument specifies the email address of the user who applied to be a member of the web.
handleSignupThankYou(rowId) Redirects to an appropriate page after user signs up for web. The rowId argument specifies the RowId in the AddressBook for the member who signed up.
handleSignupApproved(strEmail) Adds the user specified by strEmail to the web.  If user cannot be added to the web automatically, sends email to alert the owner of the pending application.
handleAddressBookInsert(record) Performs data validation before adding user data to AddressBook table. The record argument is provided by the Data_BeforeInsert method and contains the values for the record about to be inserted. 
handleAddressBookUpdate(record) Performs data validation before updating user data in AddressBook table. The record argument is provided by the Data_BeforeUpdate method and contains the values for the record about to be updated.

To see how some of these methods are used, take a look at the source view for the system pages in a new web.

The following table indicates which functions are used in which page:

canSignup() /System/SystemPages/Access.view,
canRegister() /System/SystemPages/register.view
canDesign() /Themes/template.view
RenderEditLink() /Themes/template.view
LogonHref() /Themes/template.view
LogonSidebar() /default.view
LogonView() /System/SystemPages/Logon.view
ResetPwdView() /System/SystemPages/ResetPwd.view
ChangePwdView() /System/SystemPages/ChangePwd.view
RegisterView() /System/SystemPages/Register.view
signupDecision() /AddressBook/Approve.view
handleSignupThankYou() /AddressBook/Signup/thankyou.view
handleSignupApproved() /AddressBook/Signup/
handleAddressBookInsert() /AddressBook/
handleAddressBookUpdate() /AddressBook/
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us