Child pages
  • Frontendusers

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

// BEGIN DEVELOPER DOCUMENTATION

 

Excerpt

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.

Warning

 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.

Image Removed

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

...

.

...

 

Example

Code Block
languagephp
linenumberstrue
// 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.

Changed all names in php file with new one and replace labels with labels you want.

Change column name in sql file.

Execute slq script on your db.

Plugin configuration

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

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

 

 

// END

 

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.

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.

...