diff options
author | Benny Baumann <BenBE@geshi.org> | 2015-08-04 22:08:09 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2015-08-04 22:08:09 +0200 |
commit | 97cfec770519e6f1d18b1d1696abcdcb81c3c86c (patch) | |
tree | 7786408081d21b961adc141f2f7a016ae1c8103e | |
parent | 39b237c1d4e035e6df6a7588261b6460eaf757ed (diff) | |
parent | e33a8de01c1548d155bf08d362de241906ef16c3 (diff) | |
download | cacert-mgr-97cfec770519e6f1d18b1d1696abcdcb81c3c86c.tar.gz cacert-mgr-97cfec770519e6f1d18b1d1696abcdcb81c3c86c.tar.xz cacert-mgr-97cfec770519e6f1d18b1d1696abcdcb81c3c86c.zip |
Merge branch 'bug-1391'
-rw-r--r-- | manager/application/models/User.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/manager/application/models/User.php b/manager/application/models/User.php index 24b27ed..8f9d3da 100644 --- a/manager/application/models/User.php +++ b/manager/application/models/User.php @@ -126,7 +126,7 @@ class Default_Model_User { $row = $this->db->query($query, $query_params)->fetch(); 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'; $query_params['user'] = $this->id; $this->db->query($query, $query_params); + + $this->refreshPoints(); } /** * @return boolean */ public function getAssurerStatus() { + $this->refreshPoints(); + $query = 'SELECT 1 FROM `users` WHERE `users`.`id` = :user AND '. '`assurer_blocked` = 0 AND '. |