Disable Discord/Email Credit Messages if not set
This is a quick and dirty way I suppose? But it works and makes Companys that dont give away free servers not look that dumb
This commit is contained in:
parent
2249738446
commit
c8c8ae753d
|
@ -38,6 +38,8 @@ class WelcomeMessage extends Notification implements ShouldQueue
|
|||
return ['database'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
|
@ -46,12 +48,34 @@ class WelcomeMessage extends Notification implements ShouldQueue
|
|||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
function AdditionalLines()
|
||||
{
|
||||
$AdditionalLine = "";
|
||||
if(Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL') != 0) {
|
||||
$AdditionalLine .= "Verifying your E-Mail Adress will grant you ".Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL')." additional Credits <br />";
|
||||
}
|
||||
if(Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') != 0) {
|
||||
$AdditionalLine .= "Verifying your Mail will also increase your Server Limit by " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . " <br />";
|
||||
}
|
||||
$AdditionalLine .="<br />";
|
||||
if(Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') != 0) {
|
||||
$AdditionalLine .= "You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits <br />";
|
||||
}
|
||||
if(Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') != 0) {
|
||||
$AdditionalLine .= "Verifying Discord will also increase your Server Limit by " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . " <br />";
|
||||
}
|
||||
|
||||
return $AdditionalLine;
|
||||
}
|
||||
|
||||
return [
|
||||
'title' => "Getting started!",
|
||||
'content' => "
|
||||
<p>Hello <strong>{$this->user->name}</strong>, Welcome to our dashboard!</p>
|
||||
<h5>Verification</h5>
|
||||
<p>Please verify your email address to get " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL') . " extra credits and increase your server limit to " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . "<br />You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits and to increase your server limit again with " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . "</p>
|
||||
<p>Please remember that you can verify your E-Mail Adress and Link/Verify your Discord-Account
|
||||
".AdditionalLines()."
|
||||
</p>
|
||||
<h5>Information</h5>
|
||||
<p>This dashboard can be used to create and delete servers.<br /> These servers can be used and managed on our pterodactyl panel.<br /> If you have any questions, please join our Discord server and #create-a-ticket.</p>
|
||||
<p>We hope you can enjoy this hosting experience and if you have any suggestions please let us know!</p>
|
||||
|
|
Loading…
Reference in a new issue