Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • RandyG replied on the discussion topic Profile Update and Elggx Userpoints
    I moved this question to the Beginning Developers Forum because I realized that it relates to Plugin Modifications and that might be a better place for... view reply
  • RandyG added a new discussion topic Profile Update and Elggx Userpoints in the group Beginning Developers
    I am using the elggx_userpoints plugin and would like to make further modifications and could use some help.Right now, whenever a member clicks on 'Save' on their Edit Profile page, it triggers the profileupdate event, and that event triggers the...
  • RandyG joined the group Beginning Developers
  • RandyG added a new discussion topic Profile Update and Elggx Userpoints in the group Plugin Development
    I am using the elggx_userpoints plugin and would like to make further modifications and could use some help.Right now, whenever a member clicks on 'Save' on their Edit Profile page, it triggers the profileupdate event, and that event triggers the...
    • I moved this question to the Beginning Developers Forum because I realized that it relates to Plugin Modifications and that might be a better place for it.

       

      http://community.elgg.org/discussion/view/1507726/profile-update-and-elggx-userpoints

       

    • I'm afraid it might not be possible to check if profile info has changed or not. The profile info is saved as metadata and the metadata table only has a time_created but no time_updated column. Each time you click on the save button of the edit profile page all metadata will be getting the current timestamp as new time_created regardless if the field content has changed or not. So, there's no way to check if any info has been alterered or not.

      The reason there are points awarded even if there's no profile info is entered at all is because there's no check if all profile fields (execpt the display name field) are empty or not but the profileupdate hook is always triggered. While for each profile field there's a separate check if any content has to be added to the database there's no overall stat if at least a single field has content or not. This would be possible by adding a stats variable (type bool) initiated false and getting set true if metadata is created. After processing the profile fields the hook could be triggered or not depending on the stat variable. Maybe you want to open an issue at github about this suggesting an update in Elgg core?

  • RandyG joined the group Plugin Development