mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-31 01:44:30 +02:00
feat: Add new account coins setting
This commit is contained in:
parent
7d435ff643
commit
28886551e8
@ -221,8 +221,14 @@ if($save)
|
||||
}
|
||||
}
|
||||
|
||||
if(setting('core.account_premium_points') && setting('core.account_premium_points') > 0) {
|
||||
$new_account->setCustomField('premium_points', setting('core.account_premium_points'));
|
||||
$accountDefaultPremiumPoints = setting('core.account_premium_points');
|
||||
if($accountDefaultPremiumPoints > 0) {
|
||||
$new_account->setCustomField('premium_points', $accountDefaultPremiumPoints);
|
||||
}
|
||||
|
||||
$accountDefaultCoins = setting('core.account_coins');
|
||||
if($db->hasColumn('accounts', 'coins') && $accountDefaultCoins > 0) {
|
||||
$new_account->setCustomField('coins', $accountDefaultCoins);
|
||||
}
|
||||
|
||||
$tmp_account = $email;
|
||||
|
@ -19,6 +19,8 @@ $templates = Cache::remember('templates', 5 * 60, function () {
|
||||
});
|
||||
$defaultTemplate = in_array('kathrine', $templates) ? 'kathrine' : $templates[0];
|
||||
|
||||
global $db;
|
||||
|
||||
return [
|
||||
'name' => 'MyAAC',
|
||||
'settings' => [
|
||||
@ -674,6 +676,13 @@ Sent by MyAAC,<br/>
|
||||
'desc' => 'Default premium points on new account',
|
||||
'default' => 0,
|
||||
],
|
||||
'account_coins' => [
|
||||
'name' => 'Default Account Coins',
|
||||
'type' => 'number',
|
||||
'desc' => 'Default coins on new account',
|
||||
'hidden' => !$db->hasColumn('accounts', 'coins'),
|
||||
'default' => 0,
|
||||
],
|
||||
'account_mail_change' => [
|
||||
'name' => 'Account Mail Change Days',
|
||||
'type' => 'number',
|
||||
|
Loading…
x
Reference in New Issue
Block a user