// Destroy sponsor session
function destroySponsorSession () {
// Remove all user data from session
- return ((setSession('sponsor_id', '')) && (setSession('sponsor_pass', '')));
+ return (
+ (setSession('sponsor_id', '')) &&
+ (setSession('sponsor_pass', '')) &&
+ (
+ ((isExtensionActive('theme')) && (setTheme(''))) ||
+ (!isExtensionActive('theme'))
+ )
+ );
}
// Getter for sponsor_min_points
return $ret;
}
-// Setter for theme in session
+/**
+ * Setter for theme in session (This setter does return the success of
+ * setSession() which is required e.g. for destroySponsorSession().
+ */
function setTheme ($newTheme) {
- setSession('mxchange_theme', $newTheme);
+ return setSession('mxchange_theme', $newTheme);
}
// Get id from theme
$url = 'modules.php?module=index&code=';
if (destroySponsorSession()) {
- // Remove theme cookie as well
- if (isExtensionActive('theme')) setTheme('');
-
// Logout completed
$url .= getCode('LOGOUT_DONE');
} else {
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
- `id`=%s AND
- `password`='%s'
+ `id`=%s
LIMIT 1",
array(
- bigintval(getSession('sponsor_id')),
- getSession('sponsorpass')
+ bigintval(getSession('sponsor_id'))
), __FILE__, __LINE__);
// Fetch data
</div>
<div class="para">
- Schön, dass wir Sie wieder in unserem Sponsorenbereich begrüssen dürfen!
+ Schön, dass wir Sie in unserem Sponsorenbereich begrüssen dürfen!
</div>
<div class="para">