We can't invite users in our "invite_only" instance with local accounts disabled


(Max Ludwig) #1

Hi,

we’re self-hosting version 0.9.9.11 of discourse at our company and use the deprecated Google login for now (looking into OAuth later). A few weeks back inviting still worked when we added the first batch of users to our instance. Yesterday a new guy started and we wanted to invite him but we weren’t able to find the invite button (or whatever it was). It mysteriously disappeared.

Can you help us figuring out what happened?

Thanks.

EDIT I’m admin, mod and trust level 4 (eldar).


(Sam Saffron) #2

Did you enable SSO?

If you disable the invite only setting temporarily and refresh the page does the invite button show up?

Are you trying to invite users into a secure category?


(Max Ludwig) #3

No.

If you disable the invite only setting temporarily and refresh the page does the invite button show up?

We did that. Then the user signed up himself, we approved him and turned invite_only back on because we don’t want self signup. We didn’t look for an invite button when we did this. Where is it supposed to be anyway, we forgot :sweat:

Are you trying to invite users into a secure category?

No. Just discourse in general. There’s no invite button in categories or threads either.


(Sam Saffron) #4

Can you try again, if it works with invite_only off and is bust with it on we can recategorize this to a bug.


(Arpit Jalan) #5

discourse.example.com/users/YOUR_USERNAME/invited

Also you will see Invites button on your profile page, which will take you to invites page.


(Max Ludwig) #6

This is how it looks with invite_only turned on and off.


(James Milligan) #7

I got similar behaviour with these settings:

invite only = 1
login required = 1
must approve users = 1
enable local logins = 0
enable google logins = 1
and additionally with the above (old google) set to 0, and enable google oauth2 logins = 1

The key one for me seemed to be local logins - toggling that seemed to give me the invite button

(Note: only set google logins to replicate, I don’t use them for the instance I have running)


(Max Ludwig) #8

Can confirm, I have the exact same settings. With enable_local_logins I can invite again.


(Jeff Atwood) #9

Invites are implicitly local accounts when clicked on (we create a local account for the user the second they click the invite URL), so that makes sense. If you disable local accounts invites can no longer function.


PM 'Invite Others' button disabled when local logins disabled
(Kane York) #10

I made a copy PR to make this more clear in the admin section:

https://github.com/discourse/discourse/pull/2512


(Max Ludwig) #11

I think there should be a note on invite_only as well then.


(Brett Bendickson) #12

The notes are helpful, but there is still a gap between using SSO and getting users into the system. Since there is no add user functionality, only invites, how can we get users into the system?


(Michael Downey) #13

Some discussion about that here: