You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pre>{% for cUser in createdUser %}{% if cUser.user %}{{ cUser.email }} {{ cUser.password }}<br>{% else %}{{ cUser.email }} 作成失敗<br>{% endif %}{% endfor %}</pre>
And it's displayed only if cUser.user is empty. And the view variable createdUser, which is the parent of cUser, is from the flash of the view, which again originates from action user.invite.
The action sets createdUser based on the result of a User model creation using User.createUsersByInvitation. There are 2 spots that makes an element of createdUser empty in the function.
This eventually causes false-failure; failed to create a new user but succeeded the model creation(User.createUsersByInvitation). Currently, always null error is given:
returncallback(null,createdUserList)
Solutions
It will be nice to pass an error to the caller in User.createUsersByInvitation instead of giving an invalid result. Then print the error message using the flash.
Maybe you can use a promise instead of async.each as other functions do in User model.
About
Reproduce
Admin
->ユーザー管理
menuaoi@example.com
- The error has come with `作成失敗` message
- But, I don't know why the error occured
The text was updated successfully, but these errors were encountered: