} // END - if
// Is the timeout reached?
- if ($probe >= getConfig('login_timeout')) {
+ if ($probe >= getLoginTimeout()) {
// Add login bonus to user's account
$add = ',`login_bonus`=`login_bonus`+{?login_bonus?}';
$GLOBALS['bonus_payed'] = TRUE;
// Is the account confirmed
if (getUserData('status') == 'CONFIRMED') {
// Generate new password
- $NEW_PASS = generatePassword();
+ $newPassword = generatePassword();
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `password`='%s' WHERE `userid`=%s LIMIT 1",
array(
- generateHash($NEW_PASS),
+ generateHash($newPassword),
getUserData('userid')
), __FUNCTION__, __LINE__);
// Prepare data and message for email
$message = loadEmailTemplate('guest_new_password',
array(
- 'new_pass' => $NEW_PASS,
+ 'new_pass' => $newPassword,
'nickname' => $userid
), getUserData('userid'));
array(bigintval($refid)), __FILE__, __LINE__);
// Subtract points from system
- handleBonusPoints(getConfig('bonus_ref'), $refid);
+ handleBonusPoints(getBonusRef(), $refid);
} // END - if
// Add one-time referral bonus over referral system or directly
return $GLOBALS[__FUNCTION__];
}
+// Getter for 'ap_subids' config entry
+function getApSubids () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_subids');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Determines whether 'ap_subids' is set to 'Y'
+function isApSubidsEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getApSubids() == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'ap_subids_since' config entry
+function getApSubidsSince () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_subids_since');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'select_user_zero_refid' config entry
+function getSelectUserZeroRefid () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('select_user_zero_refid');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// [EOF]
?>