[Elgg 1.8-1.12 & 2.X - 4.X: Elggx Userpoints] v1.8.2

Release Notes


  • Fixed a deprecated issue introduced with Elgg 1.8.4.


  • Thorough testing (also with 3rd party plugins as soon as they are available or I've managed to port them to Elgg 1.8)...
  • @Kimberly: if "ARRAY" shows up instead of the number of userpoints of a given user account this is the problem. Then the reason for failure of adding new points isn't the point configuration (present situation) but something has gone wrong in the past already that made the summarized userpoints of the account invalid, i.e. the operation in line 338

    new_points_of_user = old_points_of_user + points_for_action

    does not fail because points_for_action is invalid but old_points_of_user is. The operation of "ARRAY" + points_for_action results in the error.

    Unfortunately, I wasn't able to reproduce the case where the account's userpoint balance suddenly showed up "ARRAY" so far. It might be caused when some content is deleted which would as consequence also substract the userpoints awarded for this content from the account's userpoint balance. But it surely does not happen every time and I never managed to cause this resulting in an error on purpose. Maybe "ARRAY" issue is also caused by some unlucky coincidence with some server glitches.

    Could you try to reset the userpoints of the accounts that show up "ARRAY" via the userpoint plugin's configuration? The points will be set to zero but hopefully the addition of userpoints will then work again for this account. You can also add some userpoints to this account manually after resetting.

  • I clicked on reset for my own account, and it didn't reset, still says ARRAY. I also logged in as my test account, which has a few points, and for some reason it still gives me the blank white pages even on that one. Is there a way to remove ALL the points somehow and start from fresh with it, or is there another approach maybe to fix?

  • Resetting userpoints of all accounts is possible. On the Plugin settings tab is a link named "Reset All Points" right at the top of the options.

  • Its not resetting anything. How can I completely remove the user point system from the elgg and do a fresh install of this? Somehow it got screwed up, not even sure how that happened...What would be the best approach for getting rid of it and then re-installing it?

  • @Kimberly: When you reset the userpoints of a user or reset all userpoints the userpoint database entries for this user or all users respectively actually get deleted already. If the resetting process completes you should see a system message displayed "'Successfully reset userpoints." Do you see this message? The reseting code is in elggx_userpoints/actions/reset.php. You could use the code within this file to also delete the database entries manually with a few modifications (adding an include for engine/start.php, removing the gatekeeper function calls and providing the user_guid directly - either of a single user or 0 for all users). Then you could call your delete/reset script via your browser.

    You can also check your database using the Database Validator plugin (http://community.elgg.org/plugins/438616/1.4/database-validator) if there might be some faulty database entries that cause problems.

    The only other database entries left are plugin settings which should do no harm. If you save the plugin settings again they are re-saved, so there shouldn't be any wrong entries of plugin settings.

    The reason for the userpoints plugin failing to work is the ARRAY that appears instead of the number of userpoints. This shows that the corresponding database entry is faulty. I've now idea why this should have happened - and surely deleting/resetting userpoints should repair this problem and show 0 userpoints for the corresponding user afterwards.

  • Alright, I will check into what you mentioned later, and I had already tried the DB validater, it did remove some entities from the userpoints but that didn't fix the problem, was hoping it would but didn't work...Will post back later...Thanks.

  • Hi

    1-I set plugin setting to moderate points but when I add blog or wire ,... the points are added automically

    2-another problem is taht the points are not show under avatar in profile page.

  • @olive: if you set points to be moderated, does it say

    "You have been awarded ?? points."

    or does it say

    "You have been awarded ?? points pending moderation."

    In the latter case the moderation of points does work as intended. The user gets informed that his action will gain him points but the points are not added to his balance yet. Only when you approve the action on the Elggx Userpoints "Moderate" tab the user will get the points for real. This would also explain why the points do not show up on the profile page yet as you have not yet approved them.

    If the Points does not show up on the profile pages nevertheless, it could also be due to the "Display points on users profile" setting. If set to "No" the points will not be displayed. You can set this option on the "Plugin settings" tab. If the points don't show up even if the option is set to "Yes" this could be due to your site theme or some other 3rd party plugin on your site that might override the profile page view. To check out if this is the case you would need to disable such plugins / your theme temporarily to see if this solves the issue.

  • hello

    thanks for this plugin every must have it on elgg site.

    I have some confusions

    what happens if invited user is already registered I think user will get point in approved modein Transaction status

    and if a user is invited by many user and he get registerd then all members who invite that member get points whereas only one member who invted first should be awrded point. and other member should get massege that "memeber is already registered"

    when some one invite a friend or new member and he type form it should get messege automatically that member is already regitered

  • @shehbaz:

    If the invited user is already a member there shouldn't be any points awarded. But it seems this fails to work as intended, i.e. Elgg does not sent the invitation (separate check in Elgg core) but the Userpoints plugin seems to award the points nevertheless - need to fix that.

    There's also a check in the Userpoints plugin if the user invited the same person before, so you shouldn't be able to gain points by inviting the same person (at least using the same email address again) more than once. At the moment, I'm not sure if the check also includes previous invitations by other members. Actually, you could have two different points of views regarding awarding points to different users for inviting the same member. On the one hand, you could award points only to the first user who sent an invitation (the "winner"). On the other hand, it could also be fair to give points to all users who invited the same person independently of each other.

    I've got to take a look at the code to refresh my memory what exactly is currently implemented. The check for registered members most likely will require an update anyway. Addtionally, I'm currently working on the Tidypics plugin which might result in an update of the Userpoints plugin, too... Hopefully, I'll be able to work on it soon.


  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2022-5-29
  • Downloads: 15413
  • Recommendations: 47

Other Projects

View iionly's plugins