00001 <?php 00025 class BaseWebHelper extends BaseHelper { 00032 protected function __construct ($className) { 00033 // Call parent constructor 00034 parent::__construct($className); 00035 } 00036 00042 public function ifRegisterRequiresEmailVerification () { 00043 $required = ($this->getConfigInstance()->readConfig('register_requires_email') === "Y"); 00044 return $required; 00045 } 00046 00052 public function ifRegisterIncludesProfile () { 00053 $required = ($this->getConfigInstance()->readConfig('register_includes_profile') === "Y"); 00054 return $required; 00055 } 00056 00062 public function ifRegisterIncludesPersonaData () { 00063 $required = ($this->getConfigInstance()->readConfig('register_personal_data') === "Y"); 00064 return $required; 00065 } 00066 00072 public function ifProfileIncludesBirthDay () { 00073 $required = ($this->getConfigInstance()->readConfig('profile_includes_birthday') === "Y"); 00074 return $required; 00075 } 00076 00082 public function ifEmailMustBeUnique () { 00083 $isUnique = ($this->getConfigInstance()->readConfig('register_email_unique') === "Y"); 00084 return $isUnique; 00085 } 00086 00092 public function ifChatEnabled ($chatProtocol) { 00093 $required = ($this->getConfigInstance()->readConfig(sprintf("chat_enabled_%s", $chatProtocol)) == "Y"); 00094 return $required; 00095 } 00096 00102 public function ifLoginIsEnabled () { 00103 $isEnabled = ($this->getConfigInstance()->readConfig('login_enabled') === "Y"); 00104 return $isEnabled; 00105 } 00106 00112 public function ifLoginWithUsername () { 00113 $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "username"); 00114 return $isEnabled; 00115 } 00116 00122 public function ifLoginWithEmail () { 00123 $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "email"); 00124 return $isEnabled; 00125 } 00126 00132 public function ifGuestLoginAllowed () { 00133 $isAllowed = ($this->getConfigInstance()->readConfig('guest_login_allowed') === "Y"); 00134 return $isAllowed; 00135 } 00136 00142 public function ifEmailChangeRequireConfirmation () { 00143 $requireConfirm = ($this->getConfigInstance()->readConfig('email_change_confirmation') === "Y"); 00144 return $requireConfirm; 00145 } 00146 00153 public function ifRulesHaveChanged () { 00154 return false; 00155 } 00156 00162 public function ifEmailChangeAllowed () { 00163 $emailChange = ($this->getConfigInstance()->readConfig('email_change_allowed') === "Y"); 00164 return $emailChange; 00165 } 00166 00172 public function ifUserAccountUnconfirmed () { 00173 $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_unconfirmed')); 00174 return $isUnconfirmed; 00175 } 00176 00182 public function ifUserAccountLocked () { 00183 $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_locked')); 00184 return $isUnconfirmed; 00185 } 00186 00192 public function ifUserAccountGuest () { 00193 $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_guest')); 00194 return $isUnconfirmed; 00195 } 00196 00203 public function ifRefillPageActive () { 00204 $refillActive = ($this->getConfigInstance()->readConfig('refill_page_active') === "Y"); 00205 return $refillActive; 00206 } 00207 } 00208 00209 // [EOF] 00210 ?>
1.5.6