I have done extensive searches but have never found a good overview of how to use the in-built membership functions. I have several sites using EE 6 & 7 and am very adapt at all of the content side of things, just have never used any membership functions. So the question I’m asking is can anybody give me a good overview of how to set up a member registration page and how it works? There doesn’t seem to be any information about it. I’m looking to set up membership on a site and then provide extra content to members who are logged in. Thanks in advance
Straight from the docs. @ https://docs.expressionengine.com/latest/member/registration.html
at the bottom of that page there is very good example.
Thanks Daliz I have seen that - but what is missing is a description of how that all works. Can you just paste that into one of your own templates? What do the {if} statements do? There doesn’t seem to be any kind of overview or methodology about how this all works. Maybe, there doesn’t need to be - if nobody else is asking how does this work, then maybe the problem is with me! I was just hoping for an explanation about how it works - and how does it relate to the legacy member templates? Thanks 😊
It’s pretty straight forward, you should just paste this in your template and run some tests. The {if} statements just do checks (error handeling) for empty fields or when a u user doesn’t fill out the requiermends for a field like password or username..
The m_field_id_1 stands for your specific member_custom_field which you can create in the CP.
You can also use some parameters to let the form do what you need, like register for a specific role like: primary_role=”7” parameter.
As far as I know it does relate to legacy templates. Roles and Groups are still somehow the same.
That’s great, thanks for your reply. In the example for the form it has “return=”member/registration/success”” in the opening tag. Does that relate to a template? If so, are those templates already in place? This is the stuff that I don’t fully understand and of which there seems to be no big overview written about.
Yes in the example the return="member/registration/success"
parameter does refer to the legacy templates, but you can use the various member tags, and return paths, in your own templates which is what most people do nowadays.
Typically for a login area I’ll set up a template group named something like “/account”, using the index template in that group for the login form. Then add extra templates as you need, i.e.
account/index (login form when logged out + member info when logged in)
account/register (registration form)
account/edit (edit profile form)
account/forgot-password (reset password form)
Thanks Rob Allen, that’s really helpful. I feel like I am beginning to understand this a bit more now. However, looking into the docs more, it starts to get quite complex quite quickly. For example, it mentions about password validation and then an example of some JS to indicate password strength. And then this is where my understanding stops - because there isn’t any explanation about where that JS should go, or how it relates to the registration form. For me, this is what the EE docs lack a lot of - more explaining about how things work or how these scripts connect with each other! Using your example under the template group “/account” - would I be right that your registration form would have the return value of “account/register/success” - and then the template “register” checks the last URL segment for “success” and either re-directs or gives a friendly “registration successful” message? Thanks
JS powered password validation is optional, it will work without it - I’d get the basics working first then add enhancements later.
Yes the return value is in the format [template_group]/[template]/[segment_value], so you could use “account/register/success” or even “account/register/yippee” if you wanted, yes the last segment can be used to provide additional information after the form has been submitted.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.