bug 1391: Ensure current number of assurer's points used for determining maximum...
authorINOPIAE <inopiae@cacert.org>
Fri, 31 Jul 2015 07:32:56 +0000 (09:32 +0200)
committerINOPIAE <inopiae@cacert.org>
Fri, 31 Jul 2015 07:43:22 +0000 (09:43 +0200)
manager/application/models/User.php

index 0cb345e..8f9d3da 100644 (file)
@@ -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 '.