From the install:
$employee = new Employee(); $employee->id = 1; $employee->force_id = true; $employee->firstname = Tools::ucfirst($data['admin_firstname']); $employee->lastname = Tools::ucfirst($data['admin_lastname']); $employee->email = $data['admin_email']; $employee->setWsPasswd($data['admin_password']); $employee->last_passwd_gen = date('Y-m-d h:i:s', strtotime('-360 minutes')); $employee->bo_theme = 'default'; $employee->default_tab = 1; $employee->active = true; $employee->id_profile = 1; $employee->id_lang = (int) Configuration::get('PS_LANG_DEFAULT'); $employee->bo_menu = true; if (!$employee->add()) { $this->setError($this->translator->trans('Cannot create admin account', [], 'Install')); return false; }