summaryrefslogtreecommitdiff
path: root/manager
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2015-07-31 08:40:33 +0200
committerBenny Baumann <BenBE@geshi.org>2015-07-31 08:40:33 +0200
commitfc7a085b29e36dccd3e891f693693679b5cdc801 (patch)
treea023c02c108f2eee73d8bfa7618420eff5ca2112 /manager
parent733814fd08a122cf076887602894bf80175f5687 (diff)
parent7239b831f830eb8f3f40603e3beb7d78d952496c (diff)
downloadcacert-mgr-fc7a085b29e36dccd3e891f693693679b5cdc801.tar.gz
cacert-mgr-fc7a085b29e36dccd3e891f693693679b5cdc801.tar.xz
cacert-mgr-fc7a085b29e36dccd3e891f693693679b5cdc801.zip
Merge branch 'bug-1391'
Diffstat (limited to 'manager')
-rw-r--r--manager/application/models/User.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/manager/application/models/User.php b/manager/application/models/User.php
index f8ebf60..83857ca 100644
--- a/manager/application/models/User.php
+++ b/manager/application/models/User.php
@@ -115,6 +115,19 @@ class Default_Model_User {
if ($row['total'] === null) $row['total'] = 0;
$this->points = $row['total'];
+
+ if($this->points < 100) return;
+
+ $this->points = 100;
+
+ $query = "SELECT COUNT(`points`) AS `total` FROM `notary` " .
+ "WHERE `from` = :user AND `method` == 'Face to Face Meeting' AND `from` != `to`";
+ $query_params['user'] = $this->id;
+ $row = $this->db->query($query, $query_params)->fetch();
+ if ($row['total'] === null) $row['total'] = 0;
+
+ $this->points += ($row['total'] > 25) ? 50 : $row['total'];
+
}
/**