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
|
||||
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
|
||||
if (is_array($aAccounts)) {
|
||||
|
||||
$finder = $user->getUserName($iAccountId);
|
||||
if ($user->getUserNameAnon($iAccountId) == 1) {
|
||||
$finder = "Anonymous";
|
||||
} else {
|
||||
$finder = $user->getUserName($iAccountId);
|
||||
}
|
||||
|
||||
foreach ($aAccounts as $aData) {
|
||||
$aMailData['height'] = $aBlock['height'];
|
||||
$aMailData['subject'] = 'New Block';
|
||||
|
||||
@ -31,6 +31,9 @@ class User extends Base {
|
||||
public function getUserName($id) {
|
||||
return $this->getSingle($id, 'username', 'id');
|
||||
}
|
||||
public function getUserNameAnon($id) {
|
||||
return $this->getSingle($id, 'is_anonymous', 'id');
|
||||
}
|
||||
public function getUserNameByEmail($email) {
|
||||
return $this->getSingle($email, 'username', 'email', 's');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user