@@ -53,6 +53,7 @@ class AuthController extends BaseController
"name" => "string",
"email" => "string",
"captcha" => "string",
+ "password" => "string",
]);
if ($captcha = Arr::get($params, 'captcha')) {
if (!app(CaptchaService::class)->checkCaptcha($params['email'], $captcha)) {
@@ -92,6 +92,9 @@ class AuthService extends BaseService
if ($name = Arr::get($params, "name")) {
$user->name = $name;
}
+ if ($name = Arr::get($params, "password")) {
+ $user->password = $user->hashPassword($name);
+ }
$user->save();