Skip to content

Commit

Permalink
Merge pull request #385 from jjrom/develop
Browse files Browse the repository at this point in the history
Return id when create user
  • Loading branch information
jjrom authored Jan 24, 2024
2 parents 1a982c7 + ae0e8db commit 770a8ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/resto/core/api/UsersAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,10 @@ private function storeProfile($profile, $storageInfo)
);

if (isset($userInfo)) {

// Auto activation no email sent
if ($profile['activated'] === 1) {
return RestoLogUtil::success('User ' . $profile['email'] . ' created');
return RestoLogUtil::success('User ' . $profile['email'] . ' created and activated (id : ' . $profile['id'] . ')');
}

if (!(new RestoNotifier($this->context->servicesInfos, $this->context->lang))->sendMailForUserActivation($profile['email'], $this->context->core['sendmail'], array(
Expand All @@ -707,6 +708,5 @@ private function storeProfile($profile, $storageInfo)
RestoLogUtil::httpError(500, 'Database connection error');
}

return RestoLogUtil::success('User ' . $profile['email'] . ' created');
}
}

0 comments on commit 770a8ab

Please sign in to comment.