Sync DemoWorld specialty staff ownerEmailForStaff fix.
Deploy Ladill POS / deploy (push) Successful in 1m7s
Deploy Ladill POS / deploy (push) Successful in 1m7s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -585,9 +585,14 @@ final class DemoWorld
|
||||
public static function ownerEmailForStaff(?string $email): ?string
|
||||
{
|
||||
$email = strtolower(trim((string) $email));
|
||||
foreach (self::STAFF as $tier => $roster) {
|
||||
foreach ($roster as $member) {
|
||||
if (strtolower($member['email']) === $email) {
|
||||
if ($email === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Use staff() so dynamically appended specialty doctors resolve too.
|
||||
foreach (['free', 'pro', 'enterprise'] as $tier) {
|
||||
foreach (self::staff($tier) as $member) {
|
||||
if (strtolower((string) $member['email']) === $email) {
|
||||
return self::ownerEmailForTier($tier);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user