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

Image Id is not set to zero after avatar is deleted. #3977

Closed
ondrejpazourekdek opened this issue Jan 16, 2023 · 1 comment
Closed

Image Id is not set to zero after avatar is deleted. #3977

ondrejpazourekdek opened this issue Jan 16, 2023 · 1 comment
Labels
Milestone

Comments

@ondrejpazourekdek
Copy link

Describe the Bug

After resetting the avatar should be in the table image_id set to 0.

// BookStack\Http\Controllers\UserController
if ($request->has('profile_image_reset')) {
    $this->imageRepo->destroyImage($user->avatar);
    $user->image_id = 0; // added
    $user->save(); // added
}

Steps to Reproduce

Delete the avatar and check the users table.

Expected Behaviour

Zero in column image_id

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

22.11.1

PHP Version

No response

Hosting Environment

does not matter

@ssddanbrown ssddanbrown added this to the v23.01 milestone Jan 26, 2023
ssddanbrown added a commit that referenced this issue Jan 26, 2023
@ssddanbrown
Copy link
Member

Thanks for reporting @ondrej-pazourek,
this has been addressed in 03ad288, and will be part of the next feature release.

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

No branches or pull requests

2 participants