Skip to content

Commit

Permalink
fix(user): use the grouped info to fill the details
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Dec 3, 2023
1 parent 4a64075 commit da544b4
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions app/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function update() {
if ($is_success) {
$users = $this->getUserProvider();

$current_user->fill($request_document);
$current_user->fill($request_document["user"]);

try {
$users->save($current_user);
Expand All @@ -56,7 +56,7 @@ public function updatePassword() {
if ($is_success) {
$users = $this->getUserProvider();

$current_user->fill($request_document);
$current_user->fill($request_document["user"]);

try {
$users->save($current_user);
Expand All @@ -81,13 +81,21 @@ private static function makeIdentityValidation(

$usernameRules = array_merge(
config("AuthSession")->usernameValidationRules,
[sprintf("is_unique[%s.username,id,$current_user_id]",
$table_names["users"])]
[
sprintf(
"is_unique[%s.username,id,$current_user_id]",
$table_names["users"]
)
]
);
$emailRules = array_merge(
config("AuthSession")->emailValidationRules,
[sprintf("is_unique[%s.secret,id,$current_user_id]",
$table_names["identities"])]
[
sprintf(
"is_unique[%s.secret,id,$current_user_id]",
$table_names["identities"]
)
]
);

$validation->setRule($individual_name, "user", [
Expand Down

0 comments on commit da544b4

Please sign in to comment.