function post_install($options) { logger::info('Create admin account'); //设置用户体系,前后台互不相干 pamAccount::registerAuthType('desktop', 'shopadmin', '后台管理系统'); //todo: 封装成更简单的函数 $use_pass_data['login_name'] = $options['admin_uname']; $use_pass_data['createtime'] = time(); $password = pam_encrypt::make($options['admin_password']); $account = array('pam_account' => array('login_name' => $options['admin_uname'], 'login_password' => $password, 'account_type' => 'shopadmin', 'createtime' => $use_pass_data['createtime']), 'name' => $options['admin_uname'], 'super' => 1, 'status' => 1); app::get('desktop')->model('users')->save($account); }
public function post_install($options) { kernel::single('base_initial', 'sysshop')->init(); pamAccount::registerAuthType('sysshop', 'shop', app::get('sysshop')->_('商家用户系统')); }