Helix:Flags

From HelixCore

Jump to: navigation, search

Contents

User Flags

Every user has a set of "flags" which simply flag the user as being in a certain state. A stock installation of Helix comes with 5 predefined flags:

  • Red Flagged
  • Black Flagged
  • Payment Required
  • Payment Overdue
  • Payment Severely Overdue

Red and Black Flags

The first two can be quickly defined from the user editor, and are simply to warn administrators when examining the users account. Use the Red and Black flags in any way you see fit. When browsing the users, if a user has either flags set a small icon will appear next to the users name.

Payment Overdue Flags

The payment flags are automatically controlled by the billing engine. When a bill reaches its due date, the 'Payment Overdue' flag is set. When a bill reaches the deadline date, the 'Payment Severely Overdue' flag is set. When a user credits his/her account enough to pay off the bills that triggered those flags, they are unset.

If a user has an unpaid bill that reached the deadline, the user is locked out of all pages that:

  1. Require a login
  2. Are not marked as a free zone

Pages that are, by default, marked as a free zone are the billing pages so the user can log in and pay their bills, but will not see the functionality of the site that their login would normally provide.

You can define free zones at the component level, by setting $site->freeZone to true BEFORE you call the admin.php include. For example:

$site->accessReq = 256;
$site->freeZone = true;
include ( 'core/admin.php' );

Payment Required Flag

The payment required flag is special. It must be set by the user and when it is set it acts like the Payment Severely Overdue flag and blocks the user out of non-free areas. This flag is automatically unset only when ALL bills have been paid. This is useful if:

  1. The user is seriously behind in payments, and you want to block access until they pay up, or
  2. Upfront payment is required before access is allowed.

See Also

Personal tools