Skip to content

Commit

Permalink
No /myaccount for front-end requests
Browse files Browse the repository at this point in the history
Resolves #6275
  • Loading branch information
brandonkelly committed Jun 30, 2020
1 parent 5e40b1b commit 6778b8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Expand Up @@ -5,6 +5,7 @@
### Changed
- The `graphql/api` action now checks for the access token in all `Authorization` headers, as well as all comma-separated values in each individual `Authorization` header.
- Improved performance when handling asset uploads that conflict with an existing file. ([#6253](https://github.com/craftcms/cms/issues/6253))
- `craft\elements\User::getCpEditUrl()` no longer returns `myaccount` for the currently logged-in user when the method is called from the front end. ([#6275](https://github.com/craftcms/cms/issues/6275))

### Fixed
- Fixed a JavaScript error that occurred when clicking the “Export…” button, on a view that had no bulk actions. ([#6183](https://github.com/craftcms/cms/issues/6183))
Expand Down
2 changes: 1 addition & 1 deletion src/elements/User.php
Expand Up @@ -1137,7 +1137,7 @@ public function getRemainingCooldownTime()
*/
public function getCpEditUrl()
{
if ($this->getIsCurrent()) {
if (Craft::$app->getRequest()->getIsCpRequest() && $this->getIsCurrent()) {
return UrlHelper::cpUrl('myaccount');
}

Expand Down

0 comments on commit 6778b8e

Please sign in to comment.