Merge branch 'bug-1391'

bug-1396
Benny Baumann 9 years ago
commit 97cfec7705

@ -126,7 +126,7 @@ class Default_Model_User {
$row = $this->db->query($query, $query_params)->fetch(); $row = $this->db->query($query, $query_params)->fetch();
if ($row['total'] === null) $row['total'] = 0; if ($row['total'] === null) $row['total'] = 0;
$this->points += ($row['total'] > 25) ? 50 : $row['total']; $this->points += ($row['total'] > 25) ? 50 : $row['total'] * 2;
} }
@ -162,12 +162,16 @@ class Default_Model_User {
'`expire` < now()) >= 100'; '`expire` < now()) >= 100';
$query_params['user'] = $this->id; $query_params['user'] = $this->id;
$this->db->query($query, $query_params); $this->db->query($query, $query_params);
$this->refreshPoints();
} }
/** /**
* @return boolean * @return boolean
*/ */
public function getAssurerStatus() { public function getAssurerStatus() {
$this->refreshPoints();
$query = 'SELECT 1 FROM `users` WHERE `users`.`id` = :user AND '. $query = 'SELECT 1 FROM `users` WHERE `users`.`id` = :user AND '.
'`assurer_blocked` = 0 AND '. '`assurer_blocked` = 0 AND '.

Loading…
Cancel
Save