Class Accounts

MyDatabase
  |
  +--Accounts

public class Accounts
extends MyDatabase

A class that handles adding, modifying and deleting the Accounts from the table.


Constructor Summary
Accounts()
          Constructor of the class Accounts.
 
Method Summary
 bool AddGroupsToAccount(var $FormElements)
          Method to add groups to groupaccounts table for a specific account.
 bool BadAttempt(var $accountid, var $accountTries, var $lastTriedDate)
          Method to update the counter for bad attempts.
 bool DeleteAccount(var $accountid)
          Method to delete group from the table with a given key.
 bool ErrCheckAccountsForm(var $FormElements, var $accountid, var $mode)
          Method to check the form.
 array GetAccount(var $key)
          Method to get the group information with a given key.
 array GetAccountIdByUserName(var $name)
          Method to get the account information with a given name.
 string GetAccountName(var $accountid)
          Method to get the account name by a given accountid.
 string GetErrorMessage()
          Method to get the error message.
 string GetFormName()
          Method to get the form name.
 bool RemoveGroupsFromAccount(var $FormElements)
          Method to remove groups from groupaccounts table for a specific account.
 bool SetErrorMessage(var $message)
          Method to set the error message.
 bool UpdateAccount(var $FormElements, var $accountid)
          Method to update Accounts table with a given key, fields and values.
 
Methods inherited from class MyDatabase
dbFailure, Field, InsertNew, Update
 

Constructor Detail

Accounts

public Accounts()
Constructor of the class Accounts.
Method Detail

GetFormName

public string GetFormName()
Method to get the form name.

GetAccount

public array GetAccount(var $key)
Method to get the group information with a given key.

GetAccountName

public string GetAccountName(var $accountid)
Method to get the account name by a given accountid.

GetAccountIdByUserName

public array GetAccountIdByUserName(var $name)
Method to get the account information with a given name.

DeleteAccount

public bool DeleteAccount(var $accountid)
Method to delete group from the table with a given key.

AddGroupsToAccount

public bool AddGroupsToAccount(var $FormElements)
Method to add groups to groupaccounts table for a specific account.

RemoveGroupsFromAccount

public bool RemoveGroupsFromAccount(var $FormElements)
Method to remove groups from groupaccounts table for a specific account.

BadAttempt

public bool BadAttempt(var $accountid,
                       var $accountTries,
                       var $lastTriedDate)
Method to update the counter for bad attempts.

UpdateAccount

public bool UpdateAccount(var $FormElements,
                          var $accountid)
Method to update Accounts table with a given key, fields and values.

SetErrorMessage

public bool SetErrorMessage(var $message)
Method to set the error message.

GetErrorMessage

public string GetErrorMessage()
Method to get the error message.

ErrCheckAccountsForm

public bool ErrCheckAccountsForm(var $FormElements,
                                 var $accountid,
                                 var $mode)
Method to check the form. Sets the error message and which field is wrong.