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

Update UserProfileController.php #8

Closed
wants to merge 1 commit into from

Conversation

malle-pietje
Copy link

Adding a check to ensure we only update existing properties of the User prevents Exception messages like this when updating a user:

message: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uplift_factor' in 'field list' (SQL: update `users` set `uplift_factor` = 3, `users`.`updated_at` = 2021-02-10 10:50:31 where `id` = 8)"

Adding a check to ensure we only update existing properties of the User prevents Exception messages like this when updating a user:
```
message: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uplift_factor' in 'field list' (SQL: update `users` set `uplift_factor` = 3, `users`.`updated_at` = 2021-02-10 10:50:31 where `id` = 8)"
```
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #8 (6237858) into master (36efc18) will decrease coverage by 56.55%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             master       #8       +/-   ##
=============================================
- Coverage     67.70%   11.14%   -56.56%     
- Complexity      131      132        +1     
=============================================
  Files            11       11               
  Lines           709      709               
=============================================
- Hits            480       79      -401     
- Misses          229      630      +401     
Impacted Files Coverage Δ Complexity Δ
...rProfile/src/Controller/GroupProfileController.php 0.00% <0.00%> (-80.37%) 33.00% <0.00%> (ø%)
...erProfile/src/Controller/UserProfileController.php 0.00% <0.00%> (-56.11%) 66.00% <0.00%> (+1.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36efc18...6237858. Read the comment docs.

@lcharette
Copy link
Owner

Looks like a duplicate of #7, which needed some fix. This one need to make sure the same issue doesn't show up with groups.

In any case, before merging anything, I would want to add a test to catch the error first. I'll look into this when I get a chance.

@malle-pietje
Copy link
Author

OK, let me know if you need anything from me.

@lcharette
Copy link
Owner

Looks like there's actually an issue with this fix. While custom fields are updated fine, the built in one doesn't update... #7 methods looks like it work. I'll push a fix mixing both

@lcharette lcharette closed this Feb 14, 2021
lcharette added a commit that referenced this pull request Feb 14, 2021
when updating existing user or group (Ref. #7 & #8)
@lcharette
Copy link
Owner

Should be fixed in version 3.0.1 which will be released soon.

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.

None yet

2 participants