public function onUserBeforeSave($user, $isnew, $new = array())
{
return false;
}
$app=JFactory::getApplication();
$app->enqueueMessage(JText::_('PLG_USER_BIRTHDATE_WARNING'),'error');
public function onUserBeforeSave($user, $isnew, $data)
{
//************************* Birth Date < 13 years old
$okToSave = true;
$birthDateEntered = $data['date_of_birth'];
$todaysDate = mktime();
$ThirteenyearsAgo = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " - 13 years"));
if ($birthDateEntered < $ThirteenyearsAgo)
{
JError::raiseWarning(500, 'PLG_USER_BIRTHDATE_WARNING');
$okToSave = false;
}
return $okToSave;
}
public function onUserBeforeSave($user, $isnew, $data)
{
//************************* Birth Date < 13 years old
$birthDateEntered = $data['date_of_birth'];
$todaysDate = mktime();
$ThirteenyearsAgo = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " - 13 years"));
if ($birthDateEntered < $ThirteenyearsAgo)
{
JError::raiseWarning(500, 'PLG_USER_BIRTHDATE_WARNING');
$okToSave = false;
}
return $okToSave;
}
$form=JFactory::getApplication()->input->post->get('jform', array(), 'array');
$date_of_birth=$form['field_alias'];
if (easy_profile_field_alias > "2009-07-01") {
return false;
}
return true;
$user=JsnHelper::getUser();
echo $user->field_alias
public function onContentPrepareData($context, $data){
if( ( JRequest::getVar( 'option','' )=='com_users' && JRequest::getVar( 'layout','' )=='edit' ) {
$date13yearsAgo= /* CODE PHP TO GET DATE OF 13 YEARS AGO */
$data->hidden_field=$date13yearsAgo;
}
return true;
}
Is there a place (in a data table or file) where the values for each of the options are stored?All fields parameters are stored in table #__jsn_fields, but change this is not simple because parameters are stored in JSON format.
public function onContentPrepareData($context, $data){
if( ( JRequest::getVar( 'option','' )=='com_users' && JRequest::getVar( 'layout','' )=='edit' ) && ( !isset( $data->age ) || $data->age=='' || $data->age==null ) ) {
$data->age='2008-10-10';
}
return true;
}
I see; however, it is confusingWe provide a simple conditions, equal,not equal,greater than,contains...etc. These operators are very simple, the purpose of user can be complex.
it's not just me that think your 'logic' is a bit hard to understand. I've seen that from a number of people.I not agree with this, this happens 1/2 times a month, then only 1% of users have this problem. For me it is a success.
Is there any way we can 'sponsor' this type of change to the package - to get it done sooner?No, but we always hear our customer and improve our product to meet their requirements. We already working on this feature.
Although that would still limit the extension (I don't see any way to create a condition to check to see if a value is 'between 2 dates' or 'between 2 values'), it would solve the issue that we presently have.Sorry but I disagree with you, with my idea this is possible, example:
Do you have any idea how soon that might be added?Sorry we not have any code to test, this is only an idea. we will add this on your TODO list, but we not have a timeline.
(Or could you provide us with beta code to help you test? We are still developing our site so we could help test it.)
This really isn't 'logical'Sorry but I disagree with you, conditions need to have 2 state (true or false), I think that something like ""<"2003-01-01" should not return true (this is not logical).
Otherwise, a 'less than - hide' will never work properly on any field.We provide a simple conditions to make the product "Easy"
The other option that would be even better would be if we had the ability to write custom query (or at least had the ability to build compound conditions.This is not so simple, conditions need to works by server (PHP) and client (Javascript) side, It's impossible for us translate a query in both languages without errors. User should be know Javascript and php syntax but this is not "Easy".
In the Condition 1 I have:if field is empty: ""<"2003-01-01" this is true so condition show the fields
Operator - Less than
Compare with - Custom Value
Custom Value - 2003-01-01
Target Field - several other fields on the form
Target Action - Show
Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.
Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.
Before you post: read the documentation and search the forums for an answer to your question.
When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).
Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.
Language: only English
Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.
Our site uses non fat, delicious cookies which help us improve your user experience. You can read more about it in our Legal page.