DOCUMENTATION

  • Accounts
  • Developer
Search »

Extended Client Fields

Developer Info

This page provides a little info about how the module is implemented, and some tips for building on top of it.

Hooks

The module utilizes a total of 10 hooks.

Code hooks (these are events in the code which this module piggy-backs its own functionality):

  • ft_admin_update_client - called when the administrator updates the client accounts.
  • ft_update_client - called when the client updates their own account.

Template hooks (these are placed in the templates that this module chooses to insert its content):

  • admin_edit_client_main_top
  • admin_edit_client_main_middle
  • admin_edit_client_main_bottom
  • admin_edit_client_settings_top
  • admin_edit_client_settings_bottom
  • edit_client_main_top
  • edit_client_main_middle
  • edit_client_main_bottom
  • edit_client_settings_top
  • edit_client_settings_bottom

Database

The Form Tools user account database was designed to be dynamic; i.e. to allow you to create and assign additional information associated with each user account. The main [prefix]accounts table contains those settings common to all accounts: admin and clients. The [prefix]account_settings table allows you to assign arbitrary values to the client accounts which will be automatically loaded for each account as they log in. This module simply allocates additional fields to that table, which are updated by the client / administrator when requested.

Ideas for future extensibility

This module actually has rather nice implications: since the additional fields are loaded and available to the templates and code when the user logs in, you could utilize this to create client groups or subdivisions of the accounts. (e.g. create one or more dropdown fields, only accessible by the admin called "client group" called "simple", "basic", "advanced", etc - or whatever), then create a module that reads those values to choose what information should or shouldn't be displayed to the user. Just an idea!