Hi Eva, I went over your code and there’s no errors that I can spot - and I totally get your frustration. If it hadn’t been for Simon Cossar I don’t know how I’d have resolved it myself.
So, taking it backwards: if the PHP is correct, then something else must be disconnected. (browniepoints for me, yay.)
But…
I don’t know enough about any of that to be able to give suggestions or help.
If you’ve got your forum parked with the boys from Discourse Hosting, you could ask Richard (his name tag won’t pop, but this is his profile: Profile - RGJ - Discourse Meta )
Or perhaps @simon might be able to provide you with the missing steps.
Keeping my fingers crossed for you.
edit:
p.s. these are all the related plug-ins i use (+ that PHP one)
(Memberpress Drip is email marketing, so not related to this)
nor in the actual group settings (where you create it, with name, owner, etc.), it’s all straight forward and not connected to accessing through SSO - so setting or not setting this as a person’s primary group is not relavant.
There is one webhook here on Discourse that I put in as instructed by the WP-Discourse plugin:
email verification technically goes via memberpress: they (my wp-instance) send the log-in details to the user. by clicking the log-in link the users verify their address.
i know for a fact that it’s not through Discourse, because for a while it ALSO went through discourse (glitch somewhere) and Richard sorted that for me.
한동안 살펴본 적은 없지만, 필요한 것은 Discourse 코드와 결제 코드(제 경우: memberpress) 간의 통신입니다.
즉, 사용자가 결제를 중단하면 memberpress가 해당 사용자의 코드를 변경하고, 이 코드는 다른 그룹 레벨에 대응합니다.
결제와 연결이 없다면 그룹 레벨이 조정되지 않습니다.
아, 잠깐.
질문을 다시 읽어보니… 신뢰 수준(trust levels)은 어떻게 작동하는지 잘 모르겠네요.
하지만… 다른 방법이 없다면, 신뢰 수준 2로 설정된 그룹과 신뢰 수준 1로 설정된 그룹을 각각 만들고, 멤버십 플러그인을 통해 해당 그룹을 멤버들에게 할당하면 됩니다.
도움이 되길 바랍니다. 도움이 되지 않는다면 다시 깊이 파고들어야 할 것 같습니다. 이전 대화 이후로 시스템이 정상 작동하고 있어서 그 이후로는 한 번도 살펴본 적이 없거든요.
조금 손이 녹슬었고(또한 늦은 시간이라) 사실 신뢰 수준은 크게 관련이 없을 것 같습니다. 저는 신뢰 수준을 전혀 사용하지 않습니다. 그룹 신뢰 수준 2에는 '이것’에 대한 접근 권한이 있고, 그룹 신뢰 수준 1에는 없습니다.
실제 신뢰 수준은 사용되지 않습니다. 권한을 신뢰 수준이 아닌 그룹에만 설정한 경우, 신뢰 수준 1인 멤버라도 (지불을 통해) 그룹 신뢰 수준 4에 접근할 수 있습니다.
네, 해당 토픽은 여기 있습니다: Manage group membership in Discourse with WP Discourse SSO. 이 토픽에서는 add_user_to_discourse_group와 remove_user_from_discourse_group 함수를 사용하는 방법에 대해 설명하고 있습니다. WordPress 사이트가 Discourse의 SSO 제공자로 설정되어 있다고 가정하면, Discourse에서 그룹 멤버십을 관리하려면 이 함수들을 사용해야 합니다.
해당 토픽에서 사용된 예시는 PaidMembershipsPro 플러그인을 기반으로 하지만, 잘 만들어진 WordPress 멤버십 플러그인이라면 유사한 접근 방식이 작동할 것입니다.
add_groups와 remove_groups SSO 파라미터를 사용하여 그룹 멤버십을 관리하는 방법에 대해 토픽에 세부 내용을 추가할 예정입니다. 대부분의 경우, SSO 페이로드에 이러한 파라미터를 추가하여 그룹 멤버십을 관리하는 것은 최선의 접근 방식이 아닙니다. 왜냐하면 그룹 멤버십이 업데이트되기 전에 사용자가 Discourse에서 로그아웃했다가 다시 로그인해야 하기 때문입니다.
가까운 미래에는 특정 WordPress 멤버십 플러그인과 Discourse를 연결하는 표준 솔루션이 나올 것으로 기대합니다. 현재로서는 WordPress 사이트에 소량의 커스텀 코드를 추가하는 것 외에는 다른 방법이 없습니다. 평소 이러한 작업을 하지 않으신다면, 개발자를 고용하여 도움을 받으시는 것이 좋습니다.