Hello -
I've implemented Activity on my site (awesome mod!) and came across what seems to be a bug.
Under the user activity settings, I've enabled only "register" as I'd like to announce whenever someone new registers to the site, however so far all my test cases are announcing that "Anonymous" has joined. I'm using LoginToboggan for my registration handling, but I don't think that that has any effect. Could it just a timing issue between the announcement by activity and the state of the userID in the registration process? Is anyone else having this issue? (I attempted to search for this in the queue but drupal.org's search is a bit flakey with the reindexing).
Command used: Welcome our newest member, [author-all]!
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | user_reg_activity.patch | 868 bytes | sirkitree |
| #6 | useractivity.module.380702.patch | 871 bytes | jaydub |
| #4 | useractivity.module.380702.patch | 869 bytes | jaydub |
| #1 | user_reg_activity.patch | 699 bytes | sirkitree |
Comments
Comment #1
sirkitree commentedYeup, looks like there was a bug, should have been passing along the $account->uid instead of $user->uid. Try out this patch.
Comment #2
Apollo610 commentedAwesome, looks good... thanks!!
Comment #3
sirkitree commentedComment #4
jaydub commentedThat will cause a problem when the $op of the hook_user implementation is 'view'. As in user ($user) is viewing the profile page of other user ($account).
In this case $account->uid would be the target of the 'view' and not the one initiating the activity so the activity record would show the wrong user.
The issue is that when the $op is 'insert', the $user object has no uid but the $account does. So I'm thinking that something like this patch would suffice.
NOTE: still testing this patch. should have waited before hitting save :)
Comment #5
Apollo610 commentedI updated with the latest patch and will let you know how it looks when the next user registers. Thanks!
Comment #6
jaydub commentedok updated replacing author with account
Comment #7
sirkitree commentedAh, yes. I see what you mean. Thanks jaydub!
However there is no $author variable, it's $account.
Comment #8
sirkitree commentedlol.
Comment #9
sirkitree commentedComment #10
Apollo610 commentedJust wanted to let you guys know that last rolled patch (#7) was enabled on my site and tested and works great. Thanks again!
Comment #11
sirkitree commentedcommitted to dev.