Closed (fixed)
Project:
Signup
Version:
6.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
6 Jan 2008 at 00:59 UTC
Updated:
14 Sep 2009 at 18:08 UTC
When creating a View, is there any way to display the UID of each user who has signed up?
Here's the use case: I've created a view with "Signup: User: Email Address" and "Signup: User: Name" as fields that are shown in the View. I am then able to export this View as a CSV file using the latest Views Bonus Pack. But I also need to be able to display and export the UID of each user who has signed up (alongside their e-mail and username).
Is there current support (or future support) for "Signup: User: UID" as an available Views field?
Thanks for a great module (and great module maintainer)!
--Ben
Comments
Comment #1
dwwNope, there's no way to do that now. Someone would have to add support for it. Probably the best thing would be to add an option to the existing "Signup: User: Name" field (which is really just querying the UID), so that it optionally displays either the username or the numeric UID. Alternatively, you could add a whole new (trivial) field called "Signup: User: UID", but that sort of seems like a waste.
Comment #2
socialnicheguru commentedhas any progress been done here.
I can find out who signs up, but I would rather link who signed up to a node_profile that I setup and extract information from it.
C
Comment #3
socialnicheguru commentedok so I was naughty and "modified" the module. I spent the better part of the day trying to figure out a way to get the uid given the username or a link to the profile which is passed back by Signup: UID in the argument. The user uid is not passed to the view as would be expected by "$uid" but instead a link to the usernode.
so I went to signup_views.inc and changed
function views_handler_field_uid($fieldinfo, $fielddata, $value, $data) {
if (isset($value)) {
$account = user_load(array('uid' => $value));
return theme('username', $account);
}
}
to
function views_handler_field_uid($fieldinfo, $fielddata, $value, $data) {
if (isset($value)) {
return $value;
}
}
I was then able to call node_load in the view to get the information from the nodetype that I needed
$somenode= node_load(array('uid'=>$uid, 'type' => my_node_type));
I needed a fix and couldn't wait. I hope this helps someone else.
btw- you could also just add userid to the filter.
Comment #4
dwwYou can do this with views2 (D6) since there's now a "relationship" exposed to views between the {signup_log} table and the {users} table. So, anything you can view about users, you can view about users signed up to nodes. See the new default signup_user_list view as an example -- it prints the username from the {users} table by means of the "Signup: User" relationship. Views2 provides a "User: UID" field, so you can now print that for signup attendee lists.
Comment #6
msjones design commentedI'm unsure if this is related but I'm getting the following error when trying to add a "Signup: User: Email Address " field to a view
Any advise?
Comment #7
dww@msjones: That's unrelated. Please open a new bug report about that. Thanks.