Child pages
  • Frontendusers
Skip to end of metadata
Go to start of metadata
Frontendusers plugin allows you to extend CONTENIDO frontendusers without modifying the core of CMS.

Frontendusers works like a kit. You can select extensions you need like first name, last name, company etc.

So there is no restrictions. You can made your own plugins or delete fields you don't need.

 

 If you add some new frontenduser plugins, delete system property under Administration->System->Expert Settings: type: plugin name: frontendusers-lastscantime. Otherwise sometimes you won't see new fields in frontenduser area.

Structure of the plugin

Frontendusers plugin contains field folders which extends frontend user, php class to perform CRUD operations and sql file wich creates base reference table.

frontendusers

 -> email

 -> last_name

     ->last_name.php

     ->last_name.sql

 ....

 ....

class.FeUserExtended.php

pl_fe_user_data.sql

 

Example

// load extendet frontend user and get or set values
// first param is db object
// second param is table prefix, wich is con,
// third param is $idfrontenduser, which is frontenduser id, this is foreign key to the con_frontendusers table, if no id is set class creates new db entry.
$feUser = new FeUserExtended($db, 'con', $idfrontenduser);
$feUser->getValue("last_name");
$feUser->setValue("last_name", "Doe");

Creation of new field

To create a new field copy exisitng one and rename to the name you wish.

Important: the name of php file must be same.

  • Change all names in PHP file with new one and replace labels with labels you want.
  • Change column name in SQL file
  • Execute the SQL file in your database.

Plugin configuration

Plugin configuration values can be defined as key value pairs of the array $cfg['plugin'].

$cfg['plugin'][<name>] = <value>;
NameDefaultDescriptionLocationSince
frontendusersarray('groupselect', 'valid_from', 'valid_to')