src/Security/DefaultAdminService.php
public static function setDefaultAdmin($username, $password)
    {
        // don't overwrite if already set
        if (static::hasDefaultAdmin()) {
            throw new BadMethodCallException(
                "Default admin already exists. Use clearDefaultAdmin() first."
            );
        }

        if (empty($username) || empty($password)) {
            throw new InvalidArgumentException("Default admin username / password cannot be empty");
        }

        static::$default_username = $username;
        static::$default_password = $password;
        static::$has_default_admin = true;
    }
public static function setDefaultAdmin($username, $password)
    {
        // don't overwrite if already set
        if (static::hasDefaultAdmin()) {
            throw new BadMethodCallException(
                "Default admin already exists. Use clearDefaultAdmin() first."
            );
        }

        if (empty($username) || empty($password)) {
            throw new InvalidArgumentException("Default admin username / password cannot be empty");
        }

        static::$default_username = $username;
        static::$default_password = $password;
        static::$has_default_admin = true;
    }
public static function setDefaultAdmin ( $ username , $ password ) { // don't overwrite if already set if ( static :: hasDefaultAdmin ( ) ) { throw new BadMethodCallException ( "Default admin already exists. Use clearDefaultAdmin() first." ) ; } if ( empty ( $ username ) || empty ( $ password ) ) { throw new InvalidArgumentException ( "Default admin username / password cannot be empty" ) ; } static :: $ default_username = $ username ; static :: $ default_password = $ password ; static :: $ has_default_admin = true ; }
Set the default admin credentials

@param string $username
@param string $password
Set the default admin credentials