We tried to use the skeleton plugin. It seems not to work or We don't know how to make it works. The plugin is activated.
Please advice us how to.
<?php
/**
* @copyright Copyright (C) 2013 Jsn Project company. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @package Easy Profile
* website http://www.easy-profile.com
* Technical Support : Forum - http://www.easy-profile.com/support.html
*/
defined('_JEXEC') or die;
class PlgJsnSkeleton extends JPlugin
{
/*
public function triggerFieldAvatarUpdate($user,&$data,$changed,$isNew)
{
echo $user->avatar; // Old avatar value
echo $data['avatar']; // New avatar value
}
*/
public function triggerProfileUpdate($user,&$data,$changed,$isNew)
{
if(isset($data['q0q']) && !empty($data['q0q'])){
$value = $data['q0q'];
/* HERE YOU CAN ADD THE CODE TO CHECK IF THE VALUE IS VALID */
// q0q = 0 --> Private Investor
// q0q = 1 --> Investor as Company
if ($value == '0') {
$user->q8q = '1';
$user->q1q = 'Privé';
$user->save();
}
}
}
}
?>
Thanks
Regards