Fix Bug #830: Negative assurance points
If the user had more than 100 points adding more points through an automated assurance resulted in negative points Signed-off-by: Michael Tänzer <neo@nhng.de>
This commit is contained in:
parent
46d228ccc3
commit
be39a06a11
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,11 @@ class ManageAccountController extends Zend_Controller_Action
|
||||||
$assurance['points'] = $assurance['awarded'];
|
$assurance['points'] = $assurance['awarded'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only assign positive amounts
|
||||||
|
if ($assurance['points'] < 0){
|
||||||
|
$assurance['points'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->insert('notary', $assurance);
|
$this->db->insert('notary', $assurance);
|
||||||
|
|
||||||
$user['points'] += $assurance['points'];
|
$user['points'] += $assurance['points'];
|
||||||
|
|
Loading…
Reference in a new issue