<?php
 class vB_Options_Option_Logintype extends vB_Options_Option { protected function validateCustom(array $validation, mixed $rawvalue) : bool|string|array { $data = intval($rawvalue); if ($data == 0) { $requireuniqueemail = vB::getDatastore()->getOption('requireuniqueemail'); if (!$requireuniqueemail) { return ['setting_validation_error_logintype_requireuniqueemail_conflict']; } $duplicateEmails = vB::getDbAssertor()->getRows('vBAdminCP:checkDuplicateEmails'); $sharedEmailsCount = count($duplicateEmails); if ($sharedEmailsCount > 0) { return ['setting_validation_error_logintype_nonunique_emails_found', $sharedEmailsCount]; } return true; } if ($data == 1 OR $data == 2) { return true; } return false; } } 