Hosting with 20% off when you buy through the link

Members area

Accounts for the public site: login, sign-up and password reset, member types with their own fields, and pages only members, or one type of member, can open.

The members area gives the public site its own accounts: people who log in to see what visitors can't — a client portal, a materials library, a course area, a page for partners. Members are not admin users. They never see the panel, and they live apart, with their own login, sessions and password resets: a flood of attempts on the members' login can't lock an admin out, and a reset link from one side can't open the other.

Velk has no fixed roles. You define the member types the site needs — patient and therapist, student and teacher, lead and client — each with its own extra fields, and the theme decides what each type can open. Paid plans build on this area and are covered on the Store and subscriptions page.

Ask the AI

Turn on a members area for the Northside Physio site. Two member types: “Patient”, with phone and date of birth, and “Therapist”, with license number. Sign-up stays closed: the clinic creates the accounts in the admin. I need a login page at /login, a “Forgot your password?” flow and a “My exercises” page that only logged-in patients can open. Write the on-screen messages in a warm, plain tone. No payments for now. Run schema:validate at the end.

A Members link appears in the admin as soon as the block is in site.json; the pages appear once the AI creates them in the theme.

What the AI does

  • Declares the members area in site.json: the types, the fields every member has and the fields of each type.
  • Creates the login and password pages (and sign-up, when it's open) as ordinary pages of the theme. Velk receives what their forms send and does the checking; the look is the theme's.
  • Protects pages with one line at the top of their template. A visitor who isn't logged in goes to the login and, after logging in, returns to the page they asked for.
  • Writes the sentences the visitor reads in each situation (see below), then validates and checks the pages in the browser.
What the AI runs
# checks the members block, its types and their fields $ ./bin/velk schema:validate ✓ site.json is valid. # opens the site on your computer to try the login $ ./bin/velk serve

What you decide in the members block

OptionWhat it decides
enabledTurns the area on. Off or absent, the whole feature is invisible: no member addresses, no Members link in the admin.
public_registrationWhether visitors can sign up on the site. Off by default: only the admin creates accounts, and the sign-up address doesn't exist.
typesThe kinds of member, each with a label and its own fields. Optional: without types, members are one list.
fieldsFields every member has, such as phone or company. Name, e-mail and password are built in.
routesThe addresses of the member pages, such as /login instead of the default /member/login.

Protecting content

Protection is written in the theme — you ask, the AI writes it — at three levels:

  • Logged in: any member opens the page; a visitor goes to the login.
  • By type: only some types open it, such as a Therapists area; anyone else goes to another page, the home by default.
  • By plan: with paid subscriptions, a page can require an active plan.

A rule placed in a template covers every page that uses that template. To protect only some posts, ask for a switch on the posts, as below.

Ask the AI

Add a “Members only” switch to the blog posts. When it's on, everyone sees the title and the first paragraph, and visitors get a “Log in to keep reading” box instead of the rest. Any member type can read the full post.

The switch becomes a field on every post, and the post's template decides what to show. The client turns it on post by post in the admin.

Messages are codes the theme puts into words

When someone types the wrong password, Velk doesn't send a sentence: it sends a code, invalid_credentials, and the theme chooses the words. A law firm and a yoga studio don't say the same thing. The AI keeps the sentences in a list in theme/functions.php; to change the tone later, ask for it, or edit the text between the quotes.

CodeWhen it comes
invalid_credentialsWrong e-mail or password.
rate_limitedToo many attempts; it comes with the minutes to wait.
email_takenA sign-up with an e-mail that already has an account.
password_too_shortA password under 8 characters.
password_reset_sentA reset was requested. The answer is the same whether the e-mail exists or not, so the form can't reveal who has an account.
otp_sentThe login code went out by e-mail; the theme swaps the login form for the code form.

In the admin

The Members link sits under Settings in the sidebar. The list shows name, e-mail, type and last login, filters by type, and says whether registration is public or panel-only. Admins and editors can create, edit and delete members: managing them is content work, not admin-user management. On a member's screen you can:

  • change the type — fields the new type doesn't have are dropped on save;
  • set a new password, or leave it blank to keep the current one;
  • turn on two-step login, which sends a 6-digit code by e-mail at each login. The theme needs the code page too, so ask the AI for it before turning this on.

Deleting a member can't be undone.

Good to know

Does Velk confirm a new member's e-mail?

No. There is no confirmation e-mail yet: an account works as soon as it is created.

Can members log in with Google or Facebook?

No. Members log in with e-mail and password, plus the e-mail code when two-step login is on.

Which e-mails does the members area send, and in which language?

The password reset and the login code. They go out through the SMTP settings in .env (without them, through the server's mail function, which only works on servers set up for it) and in one language, the admin's default (ADMIN_LOCALE).

Can members edit their own details?

Not through a built-in screen: the engine handles login, sign-up, passwords and the login code. Details are edited in the admin.

Can I track sign-ups as conversions?

Yes: every completed sign-up sends the velk_signup_success event, covered on the tracking page.