实现用户注册默认为贡献者
// 打开Register.php
// 网站根目录 /var/Widget/Register.php
// 找到 'group' => 'subscriber'
$dataStruct = [
'name' => $this->request->name,
'mail' => $this->request->mail,
'screenName' => $this->request->name,
'password' => $hasher->hashPassword($generatedPassword),
'created' => $this->options->time,
'group' => 'subscriber'
];
// 将 'group' => 'subscriber' 修改为 'group' => 'contributor'
// 示例
$dataStruct = [
'name' => $this->request->name,
'mail' => $this->request->mail,
'screenName' => $this->request->name,
'password' => $hasher->hashPassword($generatedPassword),
'created' => $this->options->time,
'group' => 'contributor'
];
评论 (0)