Ticket #279 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

Browser does not find users added by an admin

Reported by: kevin Assigned to: renato
Priority: normal Milestone: 0.9.2
Component: core Version: 0.9.0
Severity: normal Keywords:
Cc: kevin, renato, ewout Patch Included: 1
Review Stage: accepted

Description

The browser only shows users who have registered themselves or have been invited by a friend.

It does not show users who have been added directly by an admin, for the very strange reason given here:

http://elgg.org/mod/vanillaforum/vanilla/comments.php?DiscussionID=619&page=1#Comment_4264

I have no idea why the code involving the imaginary user 0 is there, but it is definitely causing problems with the browser.

Attachments

admin_add_virtual_user.diff (1.0 kB) - added by renato on 02/03/08 00:21:53.
acceptable (but wrong?) solution

Change History

01/25/08 19:13:36 changed by ewout

  • priority changed from normal to low.
  • review_stage changed from unreviewed to accepted.
  • severity changed from normal to minor.
  • milestone changed from 0.9.1 to 1.0.

02/01/08 16:23:42 changed by kevin

  • priority changed from low to normal.
  • milestone changed from 1.0 to 0.9.1.

I notice that this priority has been set to low.

But this brought has been brought up repeatedly.

Here's another example:

http://elgg.org/mod/vanillaforum/vanilla/comments.php?DiscussionID=841

and a suggested patch has already been mentioned on the the first discussion link I included.

Your choice, but I suggest that that this bug be fixed sooner rather than later.

If you disagree, then of course feel free to change the priority and milestone again.

02/01/08 16:23:55 changed by kevin

  • severity changed from minor to normal.

02/01/08 17:02:15 changed by ewout

  • cc set to kevin.

The priority and severity fields do not have much meaning yet. I am sorry that I used them, since it just sends an unnecessary message.

What would really make a difference is having a patch attached to this ticket. If you really think it should be included fast in svn, a patch is the way to go.

02/03/08 00:21:53 changed by renato

  • attachment admin_add_virtual_user.diff added.

acceptable (but wrong?) solution

02/03/08 00:33:18 changed by renato

  • cc changed from kevin to kevin, renato, ewout.
  • owner changed from nobody to renato.
  • haspatch set to 1.
  • status changed from new to assigned.

The patch I submitted (admin_add_virtual_user.diff) is based on the one suggested at the forum thread pointed by kevin. This adds "virtual friend" with ident 0 to new users added by admin.

I don't think this is the better solution because I don't like the whole "virtual friend" idea. If someone has no contacts, it should display so in the browser. The issue comes up because the SQLs in browser code are simple (inner) joins, instead of left joins, so that users without entries in friends table are not returned.

My suggestion is to check-in (to 0.9.1) the current workaround and leave the ticket open to a future (0.9.2 or 1.0) milestone, when we could remove totally (including from invite) this "virtual friend" (this needs checking to see if there are repercussions somewhere else), and use left joins instead.

02/07/08 20:50:27 changed by renato

  • milestone changed from 0.9.1 to 0.9.2.

Patch applied in [1548].

02/07/08 20:50:53 changed by renato

  • status changed from assigned to closed.
  • resolution set to fixed.

02/07/08 20:56:27 changed by renato

Open another ticket to deal with the virtual users: #307.