Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
JavaScript Objects
General Scripting Objects
Data Access Objects
File Access Objects
Http Client Objects
Security and Membership Objects
-Member Object
changeGroup
isInGroup
-Members Object
-User Object
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

Member Object
The Member object can represent any member of a web. To construct a Member object representing a particular member of a web call either of the following methods: getMemberFromEmail(email_string) or getMemberFromName(username_string). Both of these methods return a Member object instance.

Instance Properties

email The member's email address. Read only.
name The user's name. Read only.

Instance Methods

changeGroup Changes a member's group.
isInGroup Checks to see if a user is in a group.

The example below demonstrates instantiating a Member object and changing that member's group to "Administrator".
   
   webcall function memtest()
   {
   var m = Members.getMemberFromEmail("jane@DataWeb.com");

   //Check that returned object corresponds to member
   //of the web you were looking for. If so, change
   //permissions to that of "Administrator".
   if(m.name=="Jane")
   {
      if(m.isInGroup("Administrators"))
      {
         response.write("jane@DataWeb.com is
         already an Administrator.\n");
      }
      else
      {
         m.changeGroup("Administrators");
         response.write("jane@DataWeb.com is now an
            Administrator of your web.\n");
      }
   }
   else
   {
      //Check that the email given is web member.
      if(m.name == NULL)
         response.write("jane@DataWeb.com is not a member of the web.\n");
      else
         response.write("jane@DataWeb.com is not
         the email of the member of the web called Jane.\n");
   return;
   }
   }
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us