#!/usr/bin/env php --password= [--display_name=]" . PHP_EOL); exit(1); } $username = trim($username); $displayName = is_string($displayName) && trim($displayName) !== '' ? trim($displayName) : $username; $passwordHash = password_hash($password, PASSWORD_DEFAULT); $statements = [ <<getPdo(); foreach ($statements as $statement) { Db::statement($statement); } Db::table('admin_users')->updateOrInsert( ['username' => $username], [ 'display_name' => $displayName, 'password_hash' => $passwordHash, 'is_active' => true, ] ); echo 'Admin users table initialized.' . PHP_EOL; echo 'Seeded username: ' . $username . PHP_EOL; echo 'Display name: ' . $displayName . PHP_EOL; } catch (Throwable $exception) { fwrite(STDERR, $exception::class . ': ' . $exception->getMessage() . PHP_EOL); exit(1); }