// Filter for solving task given task
function FILTER_SOLVE_TASK ($data) {
// Don't solve anything if no admin!
- if (!isAdmin()) return $data;
+ if (!isAdmin()) {
+ return $data;
+ } // END - if
// Is this a direct task id or array element task_id is found?
if (is_int($data)) {
} // END - if
// Recheck if logged in
- if (!isMember()) {
+ if ((!isMember()) || ((isAdmin()) && (!isDebugModeEnabled()))) {
return false;
} // END - if
// Is the extension ext-sql_patches installed and at least 0.3.6?
if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (isExtensionInstalledAndNewer('other', '0.2.5'))) {
// Generate random number
- setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getMemberId(), ''));
+ setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 99999), getMemberId(), ''));
} else {
// Generate *WEAK* code
setConfigEntry('RAND_NUMBER', mt_rand(1000000, 9999999));