Support

  1. Moby
  2. Support
  3. Thursday, May 22 2014, 06:35 PM
Hi,

We are nearly done with our site and i will be out of your hair soon :) I have two question which I cant seem to figure out:

1. How do i make a field unique in easy profile? For example if user enters a number for registration then another user cannot enter with the same number. (like email and username field rules)

2. We are selling packs which contain unique numbers, is there a way i can load these numbers to the database and when a user enters on first time it checks to see if the number is on the system? i.e. is there a condition i can use on easy profile to check against the number?

Thank you
Accepted Answer
admin Accepted Answer
Admin
Will you be able to assist with the trigger plugin?

Yes we always help our customer.

Prepare your system
- Create a field for serial number
- Create and fill in DB with same prefix of Joomla example abcd_serials (prefix is abcd_)
DB may have two columns serial (key id), userid (default=0)

Create the plugin
- download and enable the skeleton plugin - you can find here with docs https://www.easy-profile.com/docs/44-triggers.html
- Find this file to edit /plugins/jsn/skeleton/skeleton.php
- delete example functions triggerFieldAvatarUpdate and triggerProfileUpdate
- create function like this
triggerProfileUpdate($user,&$data,$changed,$isNew){
if(isset($data['alias_of_serial_field']) && !empty($data['alias_of_serial_field']))
$db=JFactory::getDbo();
$query="SELECT serial FROM #__serials WHERE userid=0 AND serial=".$db->quote($data['alias_of_serial_field']);
$db->setQuery($query);
if($result=$db->loadResult()){
// Assign userid to serial
$query="UPDATE #__serials SET userid=".$user->id;
$db->setQuery($query);
$db->execute();
}
else{
// Error message
$app=JFactory:getApplication();
$app->enqueueMessage('Serial no valid','error');
// remore serial filled by user
unset $data['alias_of_serial_field'];
}
}
}


NOTE: this code is not tested serves only as an idea and it will not be supported
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Hi,

How do i make a field unique in easy profile? For example if user enters a number for registration then another user cannot enter with the same number. (like email and username field rules)

No sorry, but this is a great features, we will try to implement in next release.

We are selling packs which contain unique numbers, is there a way i can load these numbers to the database and when a user enters on first time it checks to see if the number is on the system? i.e. is there a condition i can use on easy profile to check against the number?

For now the only way to do this is by using our triggers but require PHP Knowledge.
You can find documentation and example plugin at https://www.easy-profile.com/docs/44-triggers.html

For load number in DB you can try our import plugin (Download Area), docs at: https://www.easy-profile.com/docs/45-import-user-plugin.html
  1. more than a month ago
  2. Support
  3. # 1
Moby Accepted Answer
Thank you, i know you guys dont do customisation can you recommend someone i can use for the php code?
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
recommend someone

Sorry no
you guys dont do customisation

Yes we do for free, but only if respect these rule:
- Usefull for many customer
- Minor layout customization
- We help to develop custom plugins with a few lines of code
  1. more than a month ago
  2. Support
  3. # 3
Moby Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 4
Moby Accepted Answer
Thank you so much for going above and beyond excellent customer service
  1. more than a month ago
  2. Support
  3. # 5
Moby Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 6
Moby Accepted Answer
Hi we have tried everything with the above but just not working. Please can you advise what we are doing wrong
  1. more than a month ago
  2. Support
  3. # 7
Moby Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
admin Accepted Answer
Admin
Sorry for late reply,
I'm glad that you solved;)
In the script I have assumed that you have 2 column called serial and userid.
  1. more than a month ago
  2. Support
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

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.

Guidelines

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

Search Users

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.