Merge pull request #2431 from owlhooter/master
Add Anonymous check for blockfinder email
This commit is contained in:
commit
ecf2c1cc41
@ -157,8 +157,12 @@ if (empty($aAllBlocks)) {
|
|||||||
// Notify users
|
// Notify users
|
||||||
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
|
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
|
||||||
if (is_array($aAccounts)) {
|
if (is_array($aAccounts)) {
|
||||||
|
if ($user->getUserNameAnon($iAccountId) == 1) {
|
||||||
$finder = $user->getUserName($iAccountId);
|
$finder = "Anonymous";
|
||||||
|
} else {
|
||||||
|
$finder = $user->getUserName($iAccountId);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($aAccounts as $aData) {
|
foreach ($aAccounts as $aData) {
|
||||||
$aMailData['height'] = $aBlock['height'];
|
$aMailData['height'] = $aBlock['height'];
|
||||||
$aMailData['subject'] = 'New Block';
|
$aMailData['subject'] = 'New Block';
|
||||||
|
|||||||
@ -31,6 +31,9 @@ class User extends Base {
|
|||||||
public function getUserName($id) {
|
public function getUserName($id) {
|
||||||
return $this->getSingle($id, 'username', 'id');
|
return $this->getSingle($id, 'username', 'id');
|
||||||
}
|
}
|
||||||
|
public function getUserNameAnon($id) {
|
||||||
|
return $this->getSingle($id, 'is_anonymous', 'id');
|
||||||
|
}
|
||||||
public function getUserNameByEmail($email) {
|
public function getUserNameByEmail($email) {
|
||||||
return $this->getSingle($email, 'username', 'email', 's');
|
return $this->getSingle($email, 'username', 'email', 's');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user