|
@@ -49,16 +49,16 @@ |
|
|
block discarded – undo |
|
49
|
49
|
|
|
50
|
50
|
public function expireCredentials() { |
|
51
|
51
|
$expired_credentials = $this->credentialService->getExpiredCredentials($this->utils->getTime()); |
|
52
|
|
- foreach($expired_credentials as $credential){ |
|
|
52
|
+ foreach ($expired_credentials as $credential) { |
|
53
|
53
|
$link = ''; // @TODO create direct link to credential |
|
54
|
54
|
|
|
55
|
55
|
$sql = 'SELECT count(*) as `rows` from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?'; |
|
56
|
56
|
$id = $credential->getId(); |
|
57
|
57
|
$result = $this->db->executeQuery($sql, array($id)); |
|
58
|
|
- $this->logger->debug($credential->getLabel() .' is expired, checking notifications!', array('app' => 'passman')); |
|
|
58
|
+ $this->logger->debug($credential->getLabel() . ' is expired, checking notifications!', array('app' => 'passman')); |
|
59
|
59
|
$notifications = intval($result->fetch()['rows']); |
|
60
|
|
- if($notifications === 0) { |
|
61
|
|
- $this->logger->debug($credential->getLabel() .' is expired, adding notification!', array('app' => 'passman')); |
|
|
60
|
+ if ($notifications === 0) { |
|
|
61
|
+ $this->logger->debug($credential->getLabel() . ' is expired, adding notification!', array('app' => 'passman')); |
|
62
|
62
|
$this->activityService->add( |
|
63
|
63
|
Activity::SUBJECT_ITEM_EXPIRED, array($credential->getLabel(), $credential->getUserId()), |
|
64
|
64
|
'', array(), |
Please login to merge, or discard this patch.