Download the PHP package preflow/members without Composer

On this page you can find all versions of the php package preflow/members. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package members

preflow/members

Member accounts for a Preflow + Folio site: the member type in Folio with a waiting badge, a state column and a Decision panel (accept or decline with an editable message), the member roles, and a pluggable admission rule.

Install

Configuration

config/members.php, every key optional:

Fixed names (stored data depends on them; MembersConfig lists them as constants): type and table member, guard members, permissions members.access and members.decide, roles pending, member and rejected, token purposes members.confirm and members.reset, throttle purposes members.login, members.register, members.forgot and members.resend.

Links in mails use app.url and the locale prefixes of config/i18n.php (the default locale at the root): https://site.test/de/members/login.

Pages and routes

The provider registers these routes under path (in every locale: /de/members/login, the default locale without a prefix):

Method Path Page
GET, POST {path}/register register form; POST registers (same answer for known addresses); GET is a 303 to register when that is another page
GET {path}/confirm/{token} the confirm form (a mail scanner's GET uses nothing)
POST {path}/confirm confirms; then the admission decides
GET, POST {path}/login sign in (30-day remember cookie)
POST {path}/logout sign out, to {path}
GET, POST {path}/forgot ask for a reset link
GET {path}/reset/{token} the new-password form
POST {path}/reset sets the password, signs in, to landing
GET, POST {path}/resend POST sends the confirm link again; GET goes to the login
GET {path}/account the member's account page
POST {path}/account/password change the password
POST {path}/account/delete delete the account, to register

Admission

After a member confirms the e-mail, the configured Preflow\Members\Admission\Admission decides: AcceptOnConfirm (a member at once) or OwnerApproval (the owner decides in Folio, the default). A site's own rule implements the interface:

validate() is asked on every post, so its errors show together with those of the form's own fields (name, email, password, consent). $baseErrors are those (field => key): skip a costly or throttled check (a code lookup) when $baseErrors !== [], the post fails anyway.

details($member, Admission::PANEL) appear in the Decision panel (Registered … · label: value), details($member, Admission::NOTICE) in the owner's notice mail, one paragraph each; an entry with an int key is shown without a label. The keys of recordValues() must be fields of the member type; a site adds fields with its own config/models/member.json:

Site fields come after the package's in the edit form; "after": "name" on a field puts it right after that field instead. The same works for the Members settings (members_settings.json with "extends": true).

Overriding templates

The pages are @members/{register,confirm,login,forgot,reset,resend,check-inbox,thanks,closed,account}.twig plus the shared _card.twig, all extending the configured layout. @members/decision.twig is the Decision panel in Folio (a fragment in the admin, not a page). A site overrides one by putting a file of the same name in resources/members/ (searched before the package; a new directory needs a fresh request to be picked up).

To change only a part of a page, extend the original through @members-package (extending @members/register.twig from the override of the same name would recurse into itself):

register.twig has the blocks intro, admission_fields (the admission rule's own fields), extra_fields (fields you added to the member type) and consent_text; set privacy_url in config/members.php for the privacy link, or override consent_text (e.g. for a link a Folio setting chooses). The posted values are in old (old.code), the errors in errors (errors.code). The mail layout (mail.layout) is a template too. Words are changed in the lang files (see Copy and mails), not in templates.

Cron

Run members:prune nightly (the package registers the command through extra.preflow.commands, preflow list shows it). That needs preflow/devtools 0.26; with an older devtools only the command is missing, the member pages and Folio work (the package conflicts with auth, data, folio and i18n before 0.26, not with devtools):

Unconfirmed accounts go after retention.unconfirmed_days (7, from registration), declined ones after retention.declined_days (30, from the decision); expired tokens, remember rows and throttle hits are pruned. It prints counts only (no addresses or names) and a lock file in storage/locks keeps two runs from overlapping.

Locales

Locales and URL prefixes come from config/i18n.php; the package lang files ship en, de and fr. Without config/i18n.php the pages run in a single locale with no prefix.

In Folio

Copy and mails

The words of the member pages and mails are in lang/{en,de,fr}/members.php. A site changes single keys in its own lang/<locale>/members.php; the rest stays the package's. German is in the formal "Sie" form; a site that says "du" overrides the German keys.


All versions of members with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
nyholm/psr7 Version ^1.8
preflow/auth Version ^0.38 || @dev
preflow/core Version ^0.38 || @dev
preflow/data Version ^0.42 || @dev
preflow/devtools Version ^0.26 || @dev
preflow/i18n Version ^0.38 || @dev
preflow/notify Version ^0.25 || @dev
preflow/routing Version ^0.38 || @dev
preflow/validation Version ^0.26 || @dev
preflow/view Version ^0.25 || @dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package preflow/members contains the following files

Loading the files please wait ...