Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/UsersController.php
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | public static function statusInfo(User $user): array | ||||
list ($local, $domain) = explode('@', $user->email); | list ($local, $domain) = explode('@', $user->email); | ||||
$domain = Domain::where('namespace', $domain)->first(); | $domain = Domain::where('namespace', $domain)->first(); | ||||
// If that is not a public domain, add domain specific steps | // If that is not a public domain, add domain specific steps | ||||
if (!$domain->isPublic()) { | if (!$domain->isPublic()) { | ||||
$steps['domain-new'] = true; | $steps['domain-new'] = true; | ||||
$steps['domain-ldap-ready'] = 'isLdapReady'; | $steps['domain-ldap-ready'] = 'isLdapReady'; | ||||
$steps['domain-verified'] = 'isVerified'; | // $steps['domain-verified'] = 'isVerified'; | ||||
$steps['domain-confirmed'] = 'isConfirmed'; | $steps['domain-confirmed'] = 'isConfirmed'; | ||||
} | } | ||||
// Create a process check list | // Create a process check list | ||||
foreach ($steps as $step_name => $func) { | foreach ($steps as $step_name => $func) { | ||||
$object = strpos($step_name, 'user-') === 0 ? $user : $domain; | $object = strpos($step_name, 'user-') === 0 ? $user : $domain; | ||||
$step = [ | $step = [ | ||||
'label' => $step_name, | 'label' => $step_name, | ||||
'title' => __("app.process-{$step_name}"), | 'title' => __("app.process-{$step_name}"), | ||||
'state' => is_bool($func) ? $func : $object->{$func}(), | 'state' => false,//is_bool($func) ? $func : $object->{$func}(), | ||||
]; | ]; | ||||
if ($step_name == 'domain-confirmed' && !$step['state']) { | if ($step_name == 'domain-confirmed' && !$step['state']) { | ||||
$step['link'] = "/domain/{$domain->id}"; | $step['link'] = "/domain/{$domain->id}"; | ||||
} | } | ||||
$process[] = $step; | $process[] = $step; | ||||
} | } | ||||
Show All 17 Lines |