/    Sign up×
Community /Pin to ProfileBookmark

24hours auto purge code here needs change

Please help me check the below code and help me change the auto purge time to 24hours instead of 5hours please sir the code is here below.

[code=php]
public function forceMatch($sponsor) {

if($this->_user) {
$db = DB();

$settings = new ConfigSettings;
$timeout = $settings->attr(‘donate_timeout’)->val;

$donate_timeout = time() + ($timeout*60*60);

$data = array(‘:id’ => $this->_user, ‘:sponsor’ => $sponsor, ‘:timeout’ => $donate_timeout);
$stmt = $db->prepare(“UPDATE users SET sponsor = :sponsor, eligible_timeout = :timeout WHERE id = :id”);
$stmt->execute($data);

return true;

}

}

public function getMatched() {

$db = DB();
$userdata = userIDExists($this->_user);
if($userdata) {

$stmt_data = array(‘:uname’ => $userdata->username);
$stmt = $db->prepare(‘SELECT id, username, phone, last_name, first_name FROM users WHERE sponsor = :uname AND eligible = 0’);
$stmt->execute($stmt_data);

if($stmt->rowCount() > 0) {

$results = [];

while($load = $stmt->fetch()) {

$results[] = $load;
}

return $results;
}

}

}
[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 30.2017 — Looks like you need to find the settings file, and change the donate_timeout value there.
<i>
</i> $settings = new ConfigSettings;
$timeout = $settings-&gt;attr('donate_timeout')-&gt;val;
×

Success!

Help @MeekGee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...