Add referral_show setting and keep existing setting values intact.
Allow hiding the referral field on user registration via settings SQL and ConfigService, and document SQL-only Cursor rules that never overwrite live values. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -72,11 +72,21 @@ class ConfigService
|
||||
return $this->getBool('is_store', false);
|
||||
}
|
||||
|
||||
/** کد معرف در ثبتنام اجباری است (تنظیم referral_id = required) */
|
||||
public function isReferralRequired(): bool
|
||||
{
|
||||
return strtolower(trim($this->getString('referral_id'))) === 'required';
|
||||
}
|
||||
/** کد معرف در ثبتنام اجباری است (referral_id = required) — فقط وقتی فیلد نمایش داده شود */
|
||||
public function isReferralRequired(): bool
|
||||
{
|
||||
if (! $this->getBool('referral_show', true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return strtolower(trim($this->getString('referral_id'))) === 'required';
|
||||
}
|
||||
|
||||
/** فیلد کد معرف در صفحه ثبتنام اپ کاربر نمایش داده شود */
|
||||
public function isReferralFieldVisible(): bool
|
||||
{
|
||||
return $this->getBool('referral_show', true);
|
||||
}
|
||||
|
||||
public function getInt(string $key, int $default = 0): int
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user