Web Marketing Tool
Reseller
WMT .
Member
Referred By: Web Marketing Tool
Login

Member


An object for adding, viewing, editing and deleting a specific member.
Database Table: members
Extends: Entity
      Extends: Result
            Extends: AbstractDatabase


Member PHP Methods

add(array $fieldValues) v5

Adds a new record.
PARAMETERS:
$fieldValues = Array of the values for each column when adding the record (Associative array with key = field name & value = field value).
RETURN VALUE:
int = id of the new record.
0 = if fails

autoUpgradeParent() v5

Auto upgrade parent to a new membership once got qualified as set under membership settings.
PARAMETERS:
NONE
RETURN VALUE:
VOID

canViewEmail(string $vEmail) v5

Check if a user can view emails
PARAMETERS:
user's email address
RETURN VALUE:
Bool = True if user can view emails, False otherwise

checkLoaded() v5

Checks if record is loaded. throwing an error if the record failed to load successfully.
PARAMETERS:
NONE
RETURN VALUE:
VOID

commissionQualified(int $productID = 0) v5

Checks if the loaded member is qualified to earn commission for the provided product
PARAMETERS:
$productID = int, product ID
RETURN VALUE:
bool = true if the member is qualified, false otherwise

convertAll(string $message, string $prefix = "", bool $urlEncode = false) v5

Convert tilde codes for the message and return the converted string
PARAMETERS:
$message = string, the message which has the tilde codes
$prefix = string, tilde code prefix
$urlEncode = bool, true to enable URL encode for the message content, false otherwise
RETURN VALUE:
string = the message after converting the tilde codes

convertAll(string $message, string $prefix = "", bool $urlEncode = false) v5

Convert all tilde codes in HTML Content Message to values
PARAMETERS
$message = String of HTML with tilde codes
$prefix = String tilde code prefixes (Default Empty)
$urlEncode = Bool value true when applying encoding, false otherwise (Default false)
RETURN VALUE:
String of HTML content after converting the tilde codes

convertHTML(string $htmlContent = "", string $prefix = "", bool $urlEncode = false) v5

Converts ~~ variables in the $htmlContent that is provided and returns the converted content. The title of the ~~ variables are converted by the content from the column in the database with the matching title.
PARAMETERS:
$htmlContent = String, HTML content body to convert.
$prefix= String, tilde code prefix if any.
$urlEncode = Bool, true if you want to apply URL encode to the content, false otherwise
RETURN VALUE:
String = Converted HTML

convertHTML(string $htmlContent = "", string $prefix = "", bool $urlEncode = false) v5

Convert all tilde codes in HTML Content to values
PARAMETERS
$htmlContent = String of HTML with tilde codes
$prefix = String tilde code prefixes (Default Empty)
$urlEncode = Bool value true when applying encoding, false otherwise (Default false)
RETURN VALUE:
String of HTML content after converting the tilde codes

convertMember(string $message, string $prefix = "", bool $urlEncode = false) v5

Convert tilde codes for the message and return the converted string
PARAMETERS:
$message = string, the message which has the tilde codes
$prefix = string, tilde code prefix
$urlEncode = bool, true to enable URL encode for the message content, false otherwise
RETURN VALUE:
string = the message after converting the tilde codes

convertMemberVariable(string $message, int $avID, string $value, string $prefix) v5

Convert member variables tilde codes for the message and return the converted string
PARAMETERS:
$message = string, the message which has the tilde codes
$avID = int, variable id
$value = string, variable value
$prefix = string, tilde code prefix
RETURN VALUE:
string = the message after converting the tilde codes

createMember(\WMT\Container $container, string $username, string $firstName, string $email, string $phone, string $phoneCountry = "US", int $parentID = 1, int $membership = 1) v5

Creates a new member.
PARAMETERS:
$container = object
$username = string, new member username
$firstName = string, new member first name
$email = string, new member email
$phone = string, new member phone
$phoneCountry = string, new member phone country 2 letters code uppercased
$parentID = int, parent member ID
$membership = int, membership ID which the member should be assigned to
RETURN VALUE:
int = new member ID

createSignature(bool $saveToDB = true) v5

creates a member signature.
PARAMETERS:
$saveToDB = bool, true to allow saving the signature to the database, false otherwise
RETURN VALUE:
string = created signtaure

delete(string $restoreQuery = "") v5

Deletes the loaded record from the database.
PARAMETERS:
$restoreQuery = FOR INTERNAL USE. FOR TYPICAL USAGE LEAVE THIS BLANK. The restore query to pass along when deleting an object with dependencies.
RETURN VALUE:
VOID

duplicate(array $newValues = null) v5

Creates a duplicate record in the database of the current object
PARAMETERS:
$newValues = array, associative array with field name as key and field value as array value containing the new values if any
RETURN VALUE:
int = the id of the new record.

function load(string $queryWhere) v5

Loads values for the record matching the criteria specified by $queryWhere. If the there is more than one record returned from the query then only the first record is loaded.
PARAMETERS:
$queryWhere = String, SQL where query.
RETURN VALUE:
Bool = true, if success, false otherwise

getAvatarURL(string $size = "") v5

Get member's avartar image URL
PARAMETERS:
$size = string, avartar image size like "small"
RETURN VALUE:
string = avartar image URL

getCountryFlagIMG(\WMT\Map\Location $location) v5

Gets country flag image
RETURN VALUE:
String = HTML img tag for country flag image

getCurrentBalance(int $ignoreAfter = 0) v5

Get current balance for the loaded member
PARAMETERS:
$ignoreAfter = int, timestamp to ignore the earnings/payouts after
RETURN VALUE:
float = Current balance

getDatabaseName() v5

Returns object's database table name
PARAMETERS:
NONE
RETURN VALUE:
String = Database name

getDefaultTRHTML() v5

Returns the default html code for a tr row with all of the fields from the database in it as ~~ vars
PARAMETERS:
NONE
RETURN VALUE:
String = the default HTML code for a tr row with all of the fields from the database in it as ~~ vars

getDefaultVariable(\WMT\SQL\Member\MemberVariable $memberVariable) v5

Allows you to get the default value for any variable as setup in member variable section.
PARAMETERS:
$memberVariable = object, member variable
RETURN VALUE:
string = member variable default value

getDoubleOptin() v5

Gets the status of double optin setting
PARAMETERS:
NONE
RETURN VALUE:
bool = true if the double optin is turned on, false otherwise

getDownlineCount(int $afterAdded = 0) v5

Get number of downline members added after a specific date.
PARAMETERS:
$afterAdded = int, timestamp of the search date to limit the results
RETURN VALUE:
int = downline total count after a specific date.

getEmail() v5

Gets Email for a contact/member
PARAMETERS:
NONE
RETURN VALUE:
String = member/contact email address

getEmailPassword() v5

Get forgot password confirmation URL code key.
PARAMETERS:
NONE
RETURN VALUE:
string = Forgot password confirmation URL code key

getFirstLogin() v5

Checks if the member ever logged in to his account
PARAMETERS:
NONE
RETURN VALUE:
bool = true if the member logged in, false otherwise

getFullAddress() v5

Gets member's/contact's full address (Address, City, State, Zipcode and Country)
PARAMETERS:
None
RETURN VALUE:
String of full address
in format
Address, City, State Zipcode Country;

getHoldAmount() v5

Gets the total commission held for the loaded member
PARAMETERS:
NONE
RETURN VALUE:
float = commission hold amount for the loaded member

getID() v5

Sets object ID
PARAMETERS:
NONE
RETURN VALUE:
int = ID

getIP() v5

Gets last visit/login IP for the loaded member
PARAMETERS:
NONE
RETURN VALUE:
string = last visit/login IP for the loaded member

getIsAdmin() v5

Check if member is admin or not
PARAMETERS:
None
RETURN VALUE:
Bool = True if member is an admin, False otherwise

getIsEmployee() v5

Check if member is employee or not
PARAMETERS:
None
RETURN VALUE:
Bool = True if member is an employee, False otherwise

getJoinIP() v5

Gets the IP address which the member used on signup
PARAMETERS:
NONE
RETURN VALUE:
string = the IP address which the member used on signup

getJSON(bool $returnArr = false) v5

Get JSON array for the loaded record.
PARAMETERS:
Bool = true if want to return JSON, false otherwise
RETURN VALUE:
Object Array or JSON encoded version of the array

getJSONArr() v5

Gets JSON array for the loaded member data
PARAMETERS:
NONE
RETURN VALUE:
array = JSON array for the loaded member data including timezone, member variables, language, parent, membership etc

getMarkAlwaysQualify(int $memberID, string $notRequiredText, string $requiredText) v5

Specifying if the member is required to passup members according to the passup plan, or if the member is never required to passup members.
PARAMETERS:
$memberID = int, The id of the parent of the member
$notRequiredText = string, The text to use if the member is not required to qualify.
$requiredText = string, The text to use if the member is required to qualify.
RETURN VALUE:
string = link that can be clicked to turn on/off always qualify settings with current status as text. Returns a blank result if passup is turned off or if the parent passed is not this member's parent.

getParent() v5

Gets parent object for the loaded member
PARAMETERS:
NONE
RETURN VALUE:
object = parent member object

getPhone() v5

Gets phone number for a contact/member
PARAMETERS:
NONE
RETURN VALUE:
String = member/contact phone number formated

getPhoneCountry() v5

Returns country 2 letter code for a phone number.
if no country set, it returns US
PARAMETERS:
NONE
RETURN VALUE:
String = Country 2 letter code

getPhoneCountryCode() v5

Returns country code for a phone number
PARAMETERS:
NONE
RETURN VALUE:
int = Country Code

getPrimaryURL() v5

Gets primary page URL for the loaded member.
PARAMETERS:
NONE
RETURN VALUE:
string = primary page URL for the loaded member

getProjectManager() v5

Get id of the project manager member
PARAMETERS:
NONE
RETURN VALUE:
int = project manager member id

getProjectManagerName() v5

Get member name for a project manager.
PARAMETERS:
NONE
RETURN VALUE:
string = project manager first and last names.

getSignature() v5

Gets the signature for the loaded member.
PARAMETERS:
NONE
RETURN VALUE:
string = signature content

getStatus() v5

Checks if a member is approved or suspended.
PARAMETERS:
NONE
RETURN VALUE:
string = member status HTML badge

getTermsAgree() v5

Checks whether the loaded member agreed to terms.
PARAMETERS:
NONE
RETURN VALUE:
bool = true if the member agreed to the terms, false otherwise.

getTotalActiveContacts(int $addedAfter = 0) v5

Get total number of active contacts under the loaded member.
PARAMETERS:
$addedAfter = int, timestamp of the date to limit the search query
RETURN VALUE:
int = total number of active contacts under the loaded member

getTotalEarned(int $addedAfter = 0) v5

Get total earned commission by the loaded member.
PARAMETERS:
$addedAfter = int, timestamp of the date to limit the search query
RETURN VALUE:
int = total earned commission by the loaded member.

getTotalEmailLogs(int $addedAfter = 0) v5

Get total number of emails sent by the loaded member.
PARAMETERS:
$addedAfter = int, timestamp of the date to limit the search query
RETURN VALUE:
int = total number of emails sent by the loaded member.

getTotalInactiveContacts() v5

Get total number of inactive contacts under the loaded member. Inactive contacts are the contacts who opted out or never confirmed their email if double optin turned on
PARAMETERS:
NONE
RETURN VALUE:
int = total number of inactive contacts under the loaded member

getTotalNewReferrals(int $addedAfter = 0) v5

Get total number of new referrals joined under the loaded member.
PARAMETERS:
$addedAfter = int, timestamp of the date to limit the search query
RETURN VALUE:
int = total number of new referrals joined under the loaded member.

getTotalPageViews(int $addedAfter = 0) v5

Get total number of page views for the loaded member pages.
PARAMETERS:
$addedAfter = int, timestamp of the date to limit the search query
RETURN VALUE:
int = total number of page views for the loaded member pages.

getTotalPaid() v5

Get total amount paid out to the loaded member
PARAMETERS:
NONE
RETURN VALUE:
float = Total paid out amount received by the loaded member

getURL() v5

Gets redirect URL for the loaded member
PARAMETERS:
NONE
RETURN VALUE:
string = redirect URL for the loaded member

getValue(string $fieldName = "value") v5

Returns the value from a specific column for this record.
PARAMETERS:
$fieldName = String, field name.
RETURN VALUE:
Field value

getVar(int $varID) v5

Get variable value for the loaded member.
PARAMETERS:
$varID = int, variable ID
RETURN VALUE:
string = variable value

getVars() v5

Get array of member variables.
PARAMETERS:
NONE
RETURN VALUE:
array = member variables with variable title as array key and variable value as array value

hasField(string $fieldName) v5

Checks if the field shown or hidden
PARAMETERS:
$fieldName= String, Field title.
RETURN VALUE:
Bool= True if the field show is true, false otherwise

hideAllFields() v5

hides all fields(columns)
PARAMETERS:
NONE
RETURN VALUE:
VOID

hideField($fieldTitle) v5

Hides specific field title by its column title
PARAMETERS:
$fieldTitle = String, Field title.
RETURN VALUE:
VOID

holdApply(float $commissionAmount) v5

Set part of the loaded member commission to hold
PARAMETERS:
$commissionAmount = float, the amount to hold
RETURN VALUE:
float = The amount of the hold commission

holdPayment(float $paymentAmount) v5

Add payment amount as commission holding
PARAMETERS:
$paymentAmount = float, the amount to hold
RETURN VALUE:
bool = true if the amount added to hold successfully, false otherwise

isLoaded() v5

Checks if an object is loaded correctly (can be used to check if ID exists).
PARAMETERS:
NONE
RETURN VALUE:
Bool = True if the object loaded successfully, false otherwise

loadEmail(string $email) v5

Loads a member from an email address.
PARAMETERS:
$email = string, email address
RETURN VALUE:
bool = true if the member loaded correctly and the email found, false otherwise

loadFirstID() v5

Get object's first id
PARAMETERS:
NONE
RETURN VALUE:
int = First ID

loadFromInput(\WMT\Input\InputInterface $post) v5

Load member from input field with name attribute = "id" or "user".
PARAMETERS:
$post = object
RETURN VALUE:
VOID

loadID(int $id) v5

Loads values for the record with the id specified.
PARAMETERS:
$id = int, record ID.
RETURN VALUE:
Bool = true, if success, false otherwise

loadMemberDetails() v5

Load details for the loaded member object.
PARAMETERS:
NONE
RETURN VALUE:
VOID

loadSearch($iVal) v5

Load member's search keyword
PARAMETERS:
$iVal = string, search keyword for username, firstname or lastname
RETURN VALUE:
$this->load

loadSessionCookie(\WMT\Input\Cookie $cookie, bool $noResultloadAdmin = true) v5

Loads visitor and member session cookies.
PARAMETERS:
$cookie = object
$noResultloadAdmin = bool, true to load admin member if there are no reasults found for member session
RETURN VALUE:
VOID

loadUserFromInput(\WMT\Input\AbstractInput $input) v5

Loads a member from an input field with name attribute="user".
PARAMETERS:
$input = object
RETURN VALUE:
VOID

loadUsername(string $username) v5

Loads a member using a username.
PARAMETERS:
$username = string, username
RETURN VALUE:
bool = true if the member loaded correctly and the email found, false otherwise

membershipQualified() v5

Checks if the loaded member's membership is qualified to earn commission
PARAMETERS:
NONE
RETURN VALUE:
bool = true if the membership is qualified, false otherwise

provideMemberVariable(\WMT\SQL\Member\MemberVariable $memberVariable) v5

Provide member varibale object.
PARAMETERS:
$memberVariable = object
RETURN VALUE:
Void

provideMemberVariables(\WMT\SQL\Member\MemberVariables $memberVariables) v5

Provide member varibales object.
PARAMETERS:
$memberVariables = object
RETURN VALUE:
Void

save(array $fieldValues) v5

Saves the record with the new values specified in the $fieldValuesarray.
PARAMETERS:
$fieldValues = Array of the values for each column when adding the record (Associative array with key = field name & value = field value).
RETURN VALUE:
Bool = True on success, False otherwise.

setApproved(int $newApproved) v5

Sets status for the loaded member.
PARAMETERS:
$newApproved = int, 1 to set as approved, 0 to set as suspended, 2 to set as rotator for toolbox systems
RETURN VALUE:
VOID

setEmail(string $email) v5

Sets Email Address for a contact/member
PARAMETERS:
$email = String, email address
RETURN VALUE:
Bool = True if the email is valid and added correctly, False otherwise

setEmail(string $email) v5

Change email for the loaded member
PARAMETERS:
$email = string, the new email address
RETURN VALUE:
bool = true if the email changed successfully, false otherwise

setMembership(int $newMembership) v5

Sets membership for the loaded member.
PARAMETERS:
$newMembership = int, the new membership ID
RETURN VALUE:
VOID

setMyMemberID(int $memberID) v5

Sets member's ID
PARAMETERS:
$memberID = int, member id
RETURN VALUE:
VOID

setNumberFormat(string $numberFormat) v5

Sets phone number format
PARAMETERS:
$numberFormat = String specifies phone number format like "(###) ###-####"
RETURN VALUE:
void

setOriginalParentID(int $newOPID) v5

Change original parent ID for the loaded member
PARAMETERS:
$newOPID = int, new original parent member ID
RETURN VALUE:
bool = true if the new original parent set successfully, false otherwise

setParentID(int $newPID, bool $alwaysChangeBoth = false) v5

Change parent member ID for the loaded member
PARAMETERS:
$newPID = int, new parent member ID
$alwaysChangeBoth = bool, true to change both parent and original parent on one step, false otherwise
RETURN VALUE:
bool = true if the new parent set successfully, false otherwise

setPassword(string $newPassword, \WMT\Settings\Core $settingsCore) v5

Change the login password for the loaded member
PARAMETERS:
$newPassword = string, new password
$settingsCore = object
RETURN VALUE:
bool = true if the password changed successfully, false otherwise

setPhone(string $phone, string $country = "") v5

Sets phone number for a contact/member
PARAMETERS:
$phone = String, phone number without formatting
$country = String, 2 letters country code
RETURN VALUE:
Bool = True if phone number is valid and added correctly, False otherwise

setPrimaryPage(string $dPage) v5

Sets primary page for the loaded member.
PARAMETERS:
$dPage = string, primary page URL
RETURN VALUE:
VOID

setRestoreID(int $id) v5

Sets restor point ID
PARAMETERS:
$id = int, restore ID
RETURN VALUE:
VOID

setSignature(string $sig) v5

Sets the signature for the loaded member.
PARAMETERS:
$sig = string, signature content as HTML or TEXT
RETURN VALUE:
void

settingAllowDoubleOptin(bool $allowDoubleOptin = true) v5

Allow/don't allow members to turn double optin on/off
PARAMETERS:
$allowDoubleOptin = bool, true to allow members to change double optin settings, false otherwise
RETURN VALUE:
Void

settingAllowEditRedirectURL(bool $allowEditRedirectURL = true) v5

Allow/disable members to edit redirect URL (in settings page).
PARAMETERS:
$allowEditRedirectURL = bool, true to allow members to edit redirect URL, false otherwise
RETURN VALUE:
Void

settingCanMarkPaid(bool $canMarkPaid = true) v5

Allow/don't allow member to mark his downline members as paid.
PARAMETERS:
$canMarkPaid = bool, true to allow members to mark downline as paid, false otherwise
RETURN VALUE:
Void

settingDoubleOptinDefault(bool $doubleOptinDefault = true) v5

Set default settings for double optin.
PARAMETERS:
$doubleOptinDefault = bool, true to turn on double optin, false otherwise
RETURN VALUE:
Void

settingFormatPassword(\WMT\Format\Password $formatPassword) v5

Set member's password format on creating an account and on update (for validation).
PARAMETERS:
$formatPassword = object, format password object
RETURN VALUE:
Void

settingHTTPS(bool $useHTTPS = true) v5

Sets site to use https or http
PARAMETERS:
$useHTTPS = True if https on, false otherwise (default true).
RETURN VALUE:
VOID

settingIsOneUp(bool $isOneUp = true) v5

Set the system to one up compensation plane
PARAMETERS:
$isOneUp = bool, true turn on one up comp plan, false otherwise
RETURN VALUE:
Void

settingPreloadMemberVar(int $preloadMemberVar) v5

What should happen if a member doesn't provide a value for a member variable.
PARAMETERS:
$preloadMemberVar = int, preload member variables as follows
0=>Preload default value when Member creates their account
1=>Preload default value if Member Variable is blank
2=>Both
RETURN VALUE:
Void

settingSiteURL(string $siteURL) v5

Sets Site Domain
PARAMETERS:
$siteURL = String, site URL
RETURN VALUE:
VOID

settingSystemRedirectURL(string $systemRedirectURL) v5

Set member's default redirect URL.
PARAMETERS:
$systemRedirectURL = string, Redirect URL
RETURN VALUE:
Void

settingTrackingType(int $tType) v5

Set system tracking type
PARAMETERS:
$tType = int, Tracking type
RETURN VALUE:
Void

settingUseSignature(bool $useSignature = true) v5

Allow/don't allow member to use their signature in their emails.
PARAMETERS:
$useSignature = bool, true to allow members to use signature, false otherwise
RETURN VALUE:
Void

setUsername(string $newUsername) v5

Change username for the loaded member
PARAMETERS:
$newUsername = string, new username
RETURN VALUE:
bool = true if the username changed successfully, false otherwise

setVar(int $varID, string $value) v5

Set variable value for the loaded member.
PARAMETERS:
$varID = int, variable ID
$value = string, variable value
RETURN VALUE:
VOID

setVars(\WMT\SQL\Member\MemberVariables $memberVariables, array $postData, bool $isCreate = false) v5

Set variables value for the loaded member using an array.
PARAMETERS:
$memberVariables = object, member variables
$postData = array, array key = "av".VARID, array value = variable value
$isCreate = bool, true to create the variable and assign the default value if it's not set, false otherwise
RETURN VALUE:
VOID

showAllFields() v5

Show all fields(columns)
PARAMETERS:
NONE
RETURN VALUE:
VOID

showField($fieldTitle) v5

Shows specific field title by its column title
PARAMETERS:
$fieldTitle = String, Field title.
RETURN VALUE:
VOID

uplinePosition(int $uplineMemberID) v5

Gets how many up positions are required to get to a parent member
PARAMETERS:
$uplineMemberID = int, The id of the parent of the member
RETURN VALUE:
int = number of upline positions.

validateEmail(string $newEmail) v5

Checks if the email is valid to use
PARAMETERS:
$newEmail = string, the email to validate
RETURN VALUE:
bool = true if the email is valid, false otherwise

validatePhone(string $phone, string $country = "US") v5

Checks if a phone number is valid.
PARAMETERS:
$phone = string, phone number (not formated)
$country = string, country 2 letters code
RETURN VALUE:
bool = true if the phone number is valid, false otherwise

validateUsername(string $valUsername) v5

Checks if the username is valid to be used
PARAMETERS:
$valUsername = string, the username to validate
RETURN VALUE:
bool = true if the username is valid, false otherwise

Member PHP Variables

$entityType v5

int = Entity type. for members $entityType = 1


Columns in the members Database Table:

id    firstname    parent    lastname    emailaddress    username    url    phonenumber    password    approved    added    address    city    state    zipcode    country    originalparent    doubleoptin    contentgroup    membership    language    timezone    appkey    

Code Example




Sample Usage

Below is an example of how echo the name of the member that is logged in the member object to get the logged. The example is from within / (the main/root folder):



DMCA.com Protection Status Authorize.net
Valid HTML! Valid CSS!


Reseller: WMT
|
Login
(502) 225-3237