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

Closed
opened 2026-02-05 08:39:46 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @tlederer on GitHub (Dec 11, 2023).

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

Originally created by @tlederer on GitHub (Dec 11, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] 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
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 08:39:46 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 11, 2023):

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:

00b5dd7852/app/Users/Controllers/UserApiController.php (L93)

@ssddanbrown commented on GitHub (Dec 11, 2023): 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: https://github.com/BookStackApp/BookStack/blob/00b5dd78528bff804a502dcaa5cd43b18652e0a9/app/Users/Controllers/UserApiController.php#L93
Author
Owner

@tlederer commented on GitHub (Dec 11, 2023):

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.

@tlederer commented on GitHub (Dec 11, 2023): 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.
Author
Owner

@ssddanbrown commented on GitHub (Dec 13, 2023):

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

Thanks again @tlederer for raising.

@ssddanbrown commented on GitHub (Dec 13, 2023): The core issue has now been addressed in 56d07f1909c61d40a946eb636be864ede4b00ab6, with test to cover and docs updated to note, which will be part of the next feature release. Thanks again @tlederer for raising.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4359