在启用 SSO 的网站上邀请分阶段用户?

I have a handful of staged users who got deleted (don’t ask) and now am seeking to bring them back. I created them originally by addressing new PMs to them, and thought I could bring them back by inviting them to their message again.

As it turns out, this is not possible now - the invite to message modal only allows entering usernames, not email addresses. I could imagine the ability to invite staged users to a message or topic being a very handy feature to add.

Pretty sure that’s incorrect, we added the ability to invite email addresses a while back.

Specify email address in PM to field

is listed in the #releases notes for the 1.9 release.

1 个赞

Thanks, Jeff. Looks like you are right! I guess I just didn’t wait that fraction of a second it takes for that blue select to pop up. The language maybe could be updated to reflect that email addresses can be entered into this field.

6 个赞

Hmm yes perhaps we can change the copy there to add

Enter the username or email of the person you’d like to invite to this topic

But I am not sure under what conditions email can be added, this text might be used elsewhere, or email-as-target-of-PM might be conditional to trust level… I can’t remember … can you add this to your plate @jomaxro?

5 个赞

@tobiaseigen, I’m having some trouble reproducing this. Looking at the client.en.yml inviting a user to a private message should use the following text, not what you shared a screenshot of.

Invitee’s Email or Username

Any chance you customized the invite_private.email_or_username key? Here’s what I see here on Meta:

maybe this has already been fixed on meta and try? on my site it still looks like my screenshot.

What version of Discourse are you running? Can you confirm that the text is the default (not customized) in /admin/customize/site_texts?q=invite_private.email_or_username

it is the default - so far I have never changed the default text of discourse.

this is the version according to the dashboard: v2.0.0.beta10 +5

screenshot:

1 个赞

And you were definitely inviting a user to a PM, not a topic? Does your site use SSO?

yes, our site uses SSO. and we are indeed inviting a user to a PM.

1 个赞

Ah! You cannot invite a user via email with SSO enabled. That would allow the invited user to bypass SSO.

1 个赞

hmm… but I am doing it already. :slight_smile: it works.

Now I’m even more confused…

…when you invite these users to PMs, they can only participate as a staged user, right? They can’t actually log into the site?

1 个赞

Given that, I’m going to have to defer to @gerhard here. We’re getting into the complexities of SSO and staged users, and I don’t have a SSO-enabled site to test with.

2 个赞

I did some more testing here on my own site and see that the message on the screen is actually correct. It is not possible to invite an email address even if it is (incorrectly) offered in the blue select popup.

But given that we have staged users now I think it should be possible to do this even on SSO sites, the same way it is possible to start a new message to a staged user.

1 个赞

I just came across this issue again now, and had a thought. It’s occurring to me that it’s correct that you cannot invite an email address and create a staged user using the “invite to message” modal. It makes more sense to create the staged user by starting a separate PM to the email address. That way you can give the person some context.

Also, by default it doesn’t make sense to then invite staged user to a message or topic because they are not yet users and so can’t click to accept the invitation. So really this is working as expected.

However, as staff, I often miss the ability to simply add users (staged or not) to existing messages. A staff option on this modal to directly add users to the message, bypassing the invite message and acceptance step, would be handy.

1 个赞

如果我可以就这个话题分享一点看法,我发现这个问题已经讨论多年了

在我们的系统中,大多数成员已经通过我们主站的网站 Cookie 配置好了 SSO 凭据。因此,如果我们将某条消息的链接通过电子邮件发送给尚未加入社区的成员,他们仍然可以顺利通过 SSO 登录并进入社区。

看起来我也可以向某个电子邮件地址发送链接,效果几乎一样好。但在理想情况下,我希望能够像 @tobiaseigen 在这里建议的那样,直接发送邀请而无需预先创建用户账户,至少在启用了 SSO 的情况下是这样。

这样一来,SSO 就可以负责正确处理该用户的加入流程。我想,或许可以提供一个配置复选框,用于禁用此功能,以防 SSO 无法正确处理这种情况…

我们有 3000 名成员,但在前两周内只有大约 600 人访问了社区……如果我们能够邀请我们提及的人,那就太好了。

您只需将 https://forum.example.com/session/sso 作为您的邀请链接发送即可。

2 个赞

感谢你的想法!不过,问题不在于获取一个可以发送给用户的链接。主链接配合 SSO 使用效果很好……这是一个非常出色的功能。我真正想做的是使用“发送邀请”功能,向电子邮件地址发送邀请,如下所示:

但由于我使用的是 SSO,该功能已被禁用。因此,我只能看到以下内容,它仅允许我通过用户名分享,而无法使用电子邮件地址:

在我的系统中,SSO 可以顺利创建用户并登录,但该工具却禁用了发送邀请的功能。

我目前的替代方案是分享一个包含用户电子邮件地址的链接。这虽然不是正式的邀请,但至少可以启动一封包含该链接的邮件,我可以在其中添加自定义内容。当他们点击该链接时,应该可以顺利通过 SSO 登录。

我对生成的链接末尾的 ?u=my.userID 参数有点好奇……我希望它仅用于统计分享数据,而不会尝试以我的身份登录他们。

是的,它确实如此,所以你无需担心。