Skip to content

Commit

Permalink
Merge pull request #12175 from craftcms/return-photoid
Browse files Browse the repository at this point in the history
Return photoId from actionUploadUserPhoto
  • Loading branch information
brandonkelly authored Oct 24, 2022
2 parents c440bd3 + b4d7f22 commit b5140d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
- The default system email template now includes a `Content-Type` tag. ([#12156](https://github.com/craftcms/cms/pull/12156))
- `users/session-info` responses now include a `csrfTokenName` key. ([#11706](https://github.com/craftcms/cms/pull/11706), [#11767](https://github.com/craftcms/cms/pull/11767))
- The `elements/save-draft` action now supports being called from the front end. ([#12131](https://github.com/craftcms/cms/issues/12131))
- The `users/upload-user-photo` action now includes a `photoId` key in the response data. ([#12175](https://github.com/craftcms/cms/pull/12175))
- Twig templates now have `today`, `tomorrow`, and `yesterday` global variables available to them.
- Element query date params now support passing `today`, `tomorrow`, and `yesterday`. ([#10485](https://github.com/craftcms/cms/issues/10485))
- Element queries’ `relatedTo` params now only check for relations in the same site as `siteId`, if set. ([#12000](https://github.com/craftcms/cms/issues/12000), [#12072](https://github.com/craftcms/cms/pull/12072))
Expand Down
1 change: 1 addition & 0 deletions src/controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,7 @@ public function actionUploadUserPhoto(): ?Response

return $this->asJson([
'html' => $this->_renderPhotoTemplate($user),
'photoId' => $user->photoId,
]);
} catch (Throwable $exception) {
if (isset($fileLocation) && file_exists($fileLocation)) {
Expand Down

0 comments on commit b5140d4

Please sign in to comment.