Posted: June 7, 2013 at 4:49 pm
|
Is it possible to register another user as an administrator? I’ve edited the registration_page_display.php template to try and allow admins to go in and register other users if they’ve confirmed by word of mouth, etc. Is this possible with this form? |
|
Hi, Event Espresso does not deal with site registration. We do have an addon that helps with different roles etc (Roles and Permissions Basic and Roles and Permissions Pro) but neither of these will register a user. The same with WP User Integration, it assists registered user but doesnt register them. Seth came up with a function that can be added to your theme that will create a user (subscriber level) when they register for an event – https://gist.github.com/sethshoultes/5574217. If you are just wanting one other person as an administrator, it is best to create them in the User section of your WordPress site. You should not freely give out administrator access, as that person will have all the rights to the site that you have. |
|
I should have clarified, I meant register/sign up for an event, not as a WP user. Sorry about that! |
Enertech, you don’t want to give customers admin access to your website. The Roles & Permissions Basic (https://eventespresso.com/product/espresso-permissions-basic/) add-on is probably the best way to go….if I understand you correctly. |
|
|
I’ll clarify my request, I wasn’t very clear. What I’m looking to do, as an Admin myself, is to register another user for an event through the registration form (registration_page_display.php). The user will already have a WordPress User built for them, I’ll just be signing up for them. They will not be logging in as an admin or anything like that, I’m simply looking to “auto signup” users for events. The easy way would be for me to log out and log back in and fill out the form, but we’ll be dealing with hundreds of users en mass so I’m looking to automate the process. I’ve modified the form so that you can pass in a user id that you want to register if you’re an admin user, but I’m unable to locate where the system takes the user id for adding that info to the DB as I’m still being signed up with my admin user. |
|
It looks like changing the user_id in the wp_events_member_rel table from the admin user to the subscriber I’d like to sign up is the way to go. Is there a way to do that in the templates? |
|
Here’s the method that performs the addition it looks like. Is there any sort of hook I can tap into with the Custom Files to modify that userid?
event_espresso_add_user_to_event( $event_id, $userid, $attendee_id ); |
Let me get someone better to evaluate your modification… Have you also looked at the Attendee Batch Import tool? https://eventespresso.com/wiki/attendee-batch-import-tool/ |
|
|
I haven’t, we actually have an in house batch attendee tool that works great, the client also wants the ability to do it “by hand” without logging in and out for each user so I was looking into solutions for that. |
Hmmm… No direct solutions for you… How would you facilitate that the client does it “by hand”? Would they click a checkbox for each attendee and then add them to an event or specify attendee numbers e.g. iD’s 2, 5, 19, 44-85, 110-232.., etc.? |
|
|
Well I was planning to tie it into the user registration process in wordpress. After an admin finishes creating a wordpress user it would automatically send them to a registration page for an event that they chose. The URL would pass in an extra query var (in my case, user_id=x) that, combined with the fact that the user is an admin, would trigger the registration process to instead register for the user specified by the ID. Really all I need is a custom files hook before the registration happens so that I can do some checking and I should be good to go. |
Let me talk to the dev team, I’ll try to get back to you as soon as I can. |
|
|
Hi, the dev team had a discussion on this and I’m just chiming in to give you our feedback. It sounds like you want to do two things. When admin does a new registration you want to be able to either: 1. Associate that registration with an existing user in the WP users table or 2. Create a NEW user in the WP users table when creating a new registration. If so, the best solution would be to have this functionality added to the ui for registering new attendees in the backend. Would that work? If the idea seems feasible, that’s great! What we CAN do is the following for you. 1. Add an action hook to the backend register new attendee so you can add in extra fields etc. for selecting or creating an new user. 2. Add a filter hook to the backend saving of new attendees to handle any after save processing of that form. Those two hooks should provide easier developer access to add in the functionality described above. What we can’t do at this point is add in the actual functionality itself as our development time is devoted to fixing existing bugs on 3.1 and getting 4.0 (Arabica) out the door and shipped. I’ll be monitoring this thread so feel free to ask any questions to help clarify what I’ve written above. |
|
Also, I forgot to add, we do have the 3.1 codebase up on our private github repo. If you request access to the github repo you can also submit pull requests there for consideration by the dev team. That’s the quickest way to get consideration for additional changes added to the codebase. |
The support post ‘Register another user as an admin’ 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.