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>
bug-1390
Michael Tänzer 14 years ago
parent 46d228ccc3
commit be39a06a11

@ -91,6 +91,11 @@ class ManageAccountController extends Zend_Controller_Action
$assurance['points'] = $assurance['awarded'];
}
// Only assign positive amounts
if ($assurance['points'] < 0){
$assurance['points'] = 0;
}
$this->db->insert('notary', $assurance);
$user['points'] += $assurance['points'];

Loading…
Cancel
Save