Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Default user profile is not attribute #434

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MyvTsv
Copy link

@MyvTsv MyvTsv commented Oct 16, 2024

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.

Description

Ticket #34792
The default user profile is not updated

Screenshots (if appropriate):

@MyvTsv MyvTsv changed the title fix: update default user profile is not attribute fix: Default user profile is not attribute Oct 16, 2024
Comment on lines 197 to 207
if (
in_array('users_id', $profile)
&& in_array('profiles_id', $profile)
&& in_array('entities_id', $profile)
) {
$is_new_profile_user = false;
$profile_user->update([
'id' => $profile['id'],
'is_default_profile' => 1
]);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is always run ($profile alwys have users_id, profiles_id, entities_id)
so it's always updated 'is_default_profile' => 1

Comment on lines 208 to 211
$profile_user->update([
'id' => $profile['id'],
'is_default_profile' => 0
]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this is always run too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants