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

when adding users via API no invitation email gets send #4720

Closed
2 tasks done
tlederer opened this issue Dec 11, 2023 · 3 comments
Closed
2 tasks done

when adding users via API no invitation email gets send #4720

tlederer opened this issue Dec 11, 2023 · 3 comments

Comments

@tlederer
Copy link

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

when adding users via API no invitation email gets send
in the request there the parameter send_invite=1 but no email gets send
when adding manually email gets send

Exact BookStack Version

v23.10.4

Log Content

No response

Hosting Environment

Docker

@ssddanbrown
Copy link
Member

Hi @tlederer,

This appears to be an issue of the handling of this parameter within BookStack.
If you send the data as JSON, where you can specify true for the value, this should work, but I don't think it's possible to send an invite via x-www-form-urlencoded data right now.

I've assigned this to be addressed for the next feature release.

Dev notes

Incoming data is validated as boolean castable type, but not actually cast so the send invite check fails:

$sendInvite = ($data['send_invite'] ?? false) === true;

@tlederer
Copy link
Author

Perfect @ssddanbrown - just checked it. Sending the data as JSON works!
You saved my day as I will need to create over 250 accounts. Thanks so much.

@ssddanbrown
Copy link
Member

The core issue has now been addressed in 56d07f1, with test to cover and docs updated to note, which will be part of the next feature release.

Thanks again @tlederer for raising.

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

No branches or pull requests

2 participants