Support

Home Forums Ticketing Add-on Limiting who can scan.

Limiting who can scan.

Posted: November 28, 2012 at 8:06 pm


JC Riley

November 28, 2012 at 8:06 pm

I’m digging through this ticketing option. One thing I can’t figure out is how I limit what roles can scan a ticket. Even when I log in to the event espresso mobile ap with a subscriber login, I can scan a ticket. I’d like to limit that ability to just a couple of roles. How do I do that?


Dean

November 29, 2012 at 2:00 am

Hello,

I will get a developer to look into this asap. We will get back to you about it.

Thanks


JC Riley

November 29, 2012 at 9:34 am

Thanks Dean.


Seth Shoultes

  • Support Staff

November 29, 2012 at 12:58 pm

JC, We are releasing a better API very soon. In the meantime you can add this to your espresso-services/events.php file to limit scanning only to administrators:

EDIT:This needs to go after line #51
//Get the role for this user
$caps = get_user_meta($userid, 'wp_capabilities', true);
$roles = array_keys((array)$caps);
//Set this to whatever role is needed to scan tickets
if ($roles[0] == 'administrator'){
//Continue
}else{
die("<?xml version='1.0'?><events><error>4</error><desc>Invalid User Role</desc></events>");
}
Hope that helps. Please let us knwo if you need anything else.


JC Riley

November 29, 2012 at 11:10 pm

thanks, if I ad ‘editor’ after ‘administrator’ will it also allow editors to scan?

I’d like to let my customer scan without making him an admin (so he doesn’t mess with theme stuff, but still keep subscribers from being able to scan.


Dean

November 30, 2012 at 1:52 am

Hi JC,

Change administrator to editor, dont have both there. The roles build on each other so an Editor can do what a subscriber can, and an Admin can do what an Editor can. So by changing it to Editor, Editors and above have access.

The subscribers can still log into the app, but they have no rights to see anything at all, so therefore cannot scan a ticket as they cant get to the events.


JC Riley

December 3, 2012 at 8:38 am

Thanks.

The support post ‘Limiting who can scan.’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso