68 Classifieds API

Features
class tree: 68Classifieds | index: 68Classifieds | all elements

 Class Register

Description

Manages user registration (new & modify)

Located in /includes/classes/kernel/Register.php (line 17)


	
			
Variable Summary
 string $msg
Method Summary
 object Register Register ([object database $int = true])
 boolean checkUnique (string $username, string $email, [integer $id = false])
 void createCode (string $username)
 boolean createSignup (array $userDetails, [ $callHook = TRUE])
 void filterUserData ()
 array getCleanVars ()
 unknown getIP ()
 boolean modifySignup (array $userDetails)
 boolean resendConfirmation (integer $id)
 boolean sendConfirmation (integer $id)
 void setDirtyVars ( $userData)
 void setUserData (array $userData)
Variables
string $msg = '' (line 33)

Class message - usually in case of a failure

  • access: public
Methods
Constructor Register (line 75)

Register Constructor

  • access: public
object Register Register ([object database $int = true])
  • object database $int: Database functions
checkUnique (line 274)

Checks if a username or email address is unique, if an id is supplied it will check to see if this username or email address is unique excluding what is already stored for this user.

  • access: public
boolean checkUnique (string $username, string $email, [integer $id = false])
  • string $username
  • string $email
  • integer $id
createCode (line 158)

Creates the confirmation code

void createCode (string $username)
  • string $username
createJavascriptValidation (line 608)

Creates the javascript for when a user is modified.

  • return: It assigns it to the template class.
  • access: public
  • uses: getStates()
  • uses: getCountries()
void createJavascriptValidation ()
createSignup (line 297)

Inserts a record into the users table

boolean createSignup (array $userDetails, [ $callHook = TRUE])
  • array $userDetails: contains user details. See constants defined for array keys
  • $callHook
filterUserData (line 427)

Filter user submitted data

  1. values are preserved, empty values other than 0 are converted to '', all html
gets converted and tags removed. Array keys match the _dirtyVars keys

  • access: public
  • uses: strip_tags
  • uses: Filter::nonTagHtmlEntities
void filterUserData ()
getCleanVars (line 146)

Pubilc function to get the filtered "clean" variables

  • access: public
array getCleanVars ()
getConfirmationCode (line 170)

Gets the confirmation code if it is needed externally

  • access: public
string getConfirmationCode ()
getIP (line 180)

Gets the customers ip address

unknown getIP ()
modifySignup (line 450)

Modifies a record into the signup table

boolean modifySignup (array $userDetails)
  • array $userDetails: contains user details. See constants defined for array keys
resendConfirmation (line 256)

Resends the confirmation email

  • access: public
  • uses: _sendConfirmation
boolean resendConfirmation (integer $id)
  • integer $id
sendConfirmation (line 242)

Sends the confirmation email

  • access: public
  • uses: _sendConfirmation
boolean sendConfirmation (integer $id)
  • integer $id
setDirtyVars (line 135)

Public method to set dirty vars

  • access: public
void setDirtyVars ( $userData)
  • $userData
setUserData (line 124)

Sets the user data

  • access: public
void setUserData (array $userData)
  • array $userData