Why are my users showing as guests - YourMembers/yourmembers GitHub Wiki

Your Members has a special package account type called "Guest" like Free you can't get rid of this special package account type as its used internally when a user doesn't have a package. The reason might be they are not logged in, or are logged in but have not had a package applied to them.

So if a registered user has the package account type guest there could be several reasons: The user was registered outside of YM and therefore hasn't a package applied to them The user was registered and had a package but has lost it and now no longer has a package The user has entered a custom registration flow and a user has been created but the package hasn't been applied

The later one tends to cause confusion so let's start with a simpler one:

Why does Your Members create the user before they have paid?

We try to make a user as early as possible so that should something go wrong, the user still can login and reactivate their subscription. Therefore as soon as its possible to create a user we do so, this is normally immediately after page one of a flow. This user is granted a user object but doesn't have a package applied to it, because the user doesn't have a package applied to them they show up as Guest

My users are still guests after they have paid

This normally occurs when something has gone wrong and the user hasn't been updated to a package. The first thing is to check if they have paid and that the package has a package account type that is not guest (it's amazing how many people use the Guest package account type within a paid for package) assuming this is the case then things to check

Did YM receive a IPN notification this is a webhook that fires from the payment gateway to YM to tell Your Members the user has paid. If the webhook doesn't fire then then YM has no way of knowing if the user has paid so leaves them in the default state. To check if YM received an IPN notification go to Your Members -> Log -> IPN and look in the list for the user. If you can't find an IPN notification then check with the payment gateway such notification we sent, some gateways (Zombaio for example) need to have the notification URL to be setup correctly.

If the payment site sent a notification but Your Members didn't receive it then check that you don't have any security or caching plugins enabled and any firewall or proxy is allowing the notification through.

I want my users to register for free not go through a payment gateway

One of the problems we regularly see is people not putting a second page in their registration payment flows. When registering a user they must go through a payment gateway! The payment gateway can be the free gateway but it must be present in the flow, or they will not be put on a package.

How to let Guests access a registration flow

Guests have limited access (assuming you have WordPress registration on) but you can let them access your flows by simply setting the email and login/password options to be non logged in users. and adding a login form. The user can then rejoin the flow where they left off.

Ok so thats why Guest exists, but it does add a stumbling block to flows here is what I suggest for a good flow

I tend to create a package account type called New Accounts and another called Expired, then create 2 packages giving both access to profile pages and update pages both set to 6 months, free and hidden. They have no access to other content. Next I create a very simple flow with as little information as possible and only 1 package (New Account) and have it exit on my upgrade page, which has a second flow with my package options etc. As the user is technically logged in on their return (temporarily) they arrive and bounce straight into the flow, but as far as they are concerned they never really left it.

Why do this, well it gives the user a full account and gives you much more flexibility, the downside of this is they are active, so if you are using email autoresponders for example you need to segment these users out, likewise they squew internal stats.

Guest and Grace

A small side note, some gateways (GoCardless) don't activate straight away the temptation is to put someone into grace while waiting for it to activate. The problem is Grace uses the users current package which as the users new account is pending will be there old one. If they are newly registered this will be Guest, in effect putting them on grace does nothing. Instead you are better off putting them on a 7 day trial while the direct debit is processed.
⚠️ **GitHub.com Fallback** ⚠️