Support

  1. mr412
  2. General
  3. Monday, September 24 2018, 09:52 AM

function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
$user_id = $user->id;
$uniqueid = "CH" . substr(uniqid($data['lastname'], true), -5, 5);
$db = JFactory::getDbo();
$query = 'UPDATE #__jsn_users SET uniqueid = ' . $db->quote($uniqueid) . ' WHERE id = ' . $user_id;
$db->setQuery($query);
$db->execute();
}


for some reasons nothing is writing to the database.. i tryied also with $db->quote("hhh";) but not working... any idea?
Accepted Answer
admin Accepted Answer
Admin
At line 1 there is a space before <?php tag.
Attachments (1)
  1. more than a month ago
  2. General
  3. # Permalink
admin Accepted Answer
Admin
Hi,
you can use something like this:
function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
$user_id = $user->id;
$uniqueid = "CH" . substr(uniqid($data['lastname'], true), -5, 5);
$data['uniqueid'] = $uniqueid;
}


Of course you need to have a field with alias "uniqueid"
  1. more than a month ago
  2. General
  3. # 1
mr412 Accepted Answer
Thanks for your answer.

In the table jsn_users the column "uniqueid" is still "NULL"
  1. more than a month ago
  2. General
  3. # 2
mr412 Accepted Answer
ah no it works sorry perfect.. but if i log in i got this error:

Failed to start the session because headers have already been sent by "/home/job/html/plugins/jsn/skeleton/skeleton.php" at line 1.
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
Hi,
can you please send me your skeleton.php file to check it? Please add it into an ZIP archive because upload of PHP files is not allowed.
  1. more than a month ago
  2. General
  3. # 4
mr412 Accepted Answer
thanks!
  1. more than a month ago
  2. General
  3. # 5
cristianbravo Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 6
admin Accepted Answer
Admin
Hi,
this error mean that you have some output in your skeleton.php, this happen in 2 cases:
- You have some space char (or other char) before php declaration like " <?php" or after php closure like "?> "
- You have some function that make an output like "echo" function
  1. more than a month ago
  2. General
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

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.