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->setErrorCodes($this->aErrorCodes);
|
||||
$ndata = $notifs->getNotificationSettings($uid);
|
||||
if (is_array($ndata)) {
|
||||
foreach ($ndata as $nd) {
|
||||
if ($nd['type'] == 'success_login' && $nd['active'] == 1) {
|
||||
// seems to be active, let's send it
|
||||
$aDataN['username'] = $username;
|
||||
$aDataN['email'] = $this->getUserEmail($username);
|
||||
$aDataN['subject'] = 'Successful login notification';
|
||||
$notifs->sendNotification($uid, 'success_login', $aDataN);
|
||||
}
|
||||
}
|
||||
if ($ndata['success_login'] == 1) {
|
||||
// seems to be active, let's send it
|
||||
$aDataN['username'] = $username;
|
||||
$aDataN['email'] = $this->getUserEmail($username);
|
||||
$aDataN['subject'] = 'Successful login notification';
|
||||
$notifs->sendNotification($uid, 'success_login', $aDataN);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user