mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Add registered/confirmed in email subject
This commit is contained in:
parent
1459dabe67
commit
4a3d0cd430
@ -149,17 +149,7 @@ class HomeController extends BaseController
|
||||
$subject = 'Customer Message [';
|
||||
if (Utils::isNinjaProd()) {
|
||||
$subject .= str_replace('db-ninja-', '', config('database.default'));
|
||||
$account = Auth::user()->account;
|
||||
if ($account->isTrial()) {
|
||||
$subject .= 'T';
|
||||
} elseif ($account->isEnterprise()) {
|
||||
$subject .= 'E';
|
||||
} elseif ($account->isPro()) {
|
||||
$subject .= 'P';
|
||||
} else {
|
||||
$subject .= 'H';
|
||||
}
|
||||
$subject .= '] ';
|
||||
$subject .= Auth::user()->present()->statusCode . '] ';
|
||||
} else {
|
||||
$subject .= 'Self-Host] | ';
|
||||
}
|
||||
|
@ -13,4 +13,31 @@ class UserPresenter extends EntityPresenter
|
||||
{
|
||||
return $this->entity->first_name . ' ' . $this->entity->last_name;
|
||||
}
|
||||
|
||||
public function statusCode()
|
||||
{
|
||||
$status = '';
|
||||
$user = $this->entity;
|
||||
$account = $user->account;
|
||||
|
||||
if ($user->confirmed) {
|
||||
$status .= 'C';
|
||||
} elseif ($user->registered) {
|
||||
$status .= 'R';
|
||||
} else {
|
||||
$status .= 'N';
|
||||
}
|
||||
|
||||
if ($account->isTrial()) {
|
||||
$status .= 'T';
|
||||
} elseif ($account->isEnterprise()) {
|
||||
$status .= 'E';
|
||||
} elseif ($account->isPro()) {
|
||||
$status .= 'P';
|
||||
} else {
|
||||
$status .= 'H';
|
||||
}
|
||||
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user