fixed my incorrect use of notif settings array
This commit is contained in:
parent
f3a6d65eab
commit
8ed8338b3e
@ -141,16 +141,12 @@ class User extends Base {
|
|||||||
$notifs->setSetting($this->setting);
|
$notifs->setSetting($this->setting);
|
||||||
$notifs->setErrorCodes($this->aErrorCodes);
|
$notifs->setErrorCodes($this->aErrorCodes);
|
||||||
$ndata = $notifs->getNotificationSettings($uid);
|
$ndata = $notifs->getNotificationSettings($uid);
|
||||||
if (is_array($ndata)) {
|
if ($ndata['success_login'] == 1) {
|
||||||
foreach ($ndata as $nd) {
|
// seems to be active, let's send it
|
||||||
if ($nd['type'] == 'success_login' && $nd['active'] == 1) {
|
$aDataN['username'] = $username;
|
||||||
// seems to be active, let's send it
|
$aDataN['email'] = $this->getUserEmail($username);
|
||||||
$aDataN['username'] = $username;
|
$aDataN['subject'] = 'Successful login notification';
|
||||||
$aDataN['email'] = $this->getUserEmail($username);
|
$notifs->sendNotification($uid, 'success_login', $aDataN);
|
||||||
$aDataN['subject'] = 'Successful login notification';
|
|
||||||
$notifs->sendNotification($uid, 'success_login', $aDataN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user