Refactor & Improvements
- fixed position of checkbox in comment form - refactored Subscriber::subscribe() method - removed Form\Subscribe class in favor of Subscription\Comment (I'll create a similar class for Registration) - added labels in Settings > Basics for Subscribe in comments & registration - added method in Setting model to check whether signup confirmation is enabled
This commit is contained in:
@ -67,4 +67,16 @@ class Setting extends Model {
|
||||
$exists->value = $model['value'];
|
||||
return $exists->save();
|
||||
}
|
||||
|
||||
public static function hasSignupConfirmation() {
|
||||
$signup_confirmation = Setting::getValue('signup_confirmation', array());
|
||||
$has_signup_confirmation = true;
|
||||
if(array_key_exists('enabled', $signup_confirmation)) {
|
||||
$has_signup_confirmation = filter_var(
|
||||
$signup_confirmation['enabled'],
|
||||
FILTER_VALIDATE_BOOLEAN
|
||||
);
|
||||
}
|
||||
return $has_signup_confirmation;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user