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

dww’s picture

Category: support » feature

Nope, 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.

socialnicheguru’s picture

has 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

socialnicheguru’s picture

ok 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.

dww’s picture

Version: 5.x-2.3 » 6.x-1.x-dev
Assigned: Unassigned » dww
Status: Active » Fixed

You 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

msjones design’s picture

I'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

user warning: Unknown column 'mail' in 'field list' query: SELECT node.nid AS nid, node_data_field_junglesignup.field_junglesignup_value AS node_data_field_junglesignup_field_junglesignup_value, node.type AS node_type, node.vid AS node_vid, signup.status AS signup_status, signup_log.form_data AS signup_log_form_data, signup_log.nid AS signup_log_nid, signup_log.sid AS signup_log_sid, signup_log.uid AS signup_log_uid, signup_log.anon_mail AS signup_log_anon_mail, mail FROM node node LEFT JOIN content_type_jungle_event node_data_field_junglesignup ON node.vid = node_data_field_junglesignup.vid LEFT JOIN signup signup ON node.nid = signup.nid LEFT JOIN signup_log signup_log ON node.nid = signup_log.nid WHERE node.type in ('jungle_event') LIMIT 0, 100 in /nfs/www/WWW_pages/sfcof/dev/sites/all/modules/views/includes/view.inc on line 755.

Any advise?

dww’s picture

@msjones: That's unrelated. Please open a new bug report about that. Thanks.