User ID problem

By: Jon Stu | Asked: 03/18/2024
ForumsCategory: General questionsUser ID problem
Jon Stu asked 8 months ago
I would like a user I have created (Bob- Editor role) to be able to login on the front end and fill out a form to register other users (Alice - contributer role).
I have created a form to to collect user details, and have a Register user action setup.
Bob can login and fill out the form, and this creates a new user Alice (as susbcriber), and sends her a link to login. All good.
But when I look in the entry that Bob has made, the creator is Alice and the user id field of the entry is Alice.
This means I can't filter a view with Bobs user id, to show all his new users.
Does anyone know why this is occuring?
2 Answers
Rob LeVineRob LeVine answered 8 months ago
I just created a user registration form, and created a new entry in it and the same thing happened and, honestly, that makes sense to me. What I suggest doing is adding a hidden field, something like "creator", "parent_id" or "group_id" and then setting that value to the current user when the entry is created. You can use frm_after_create_entry Then you can filter your views on the hidden field, rather than the owner of the user record.
Jon Stu answered 8 months ago
Great, thanks I'll try that!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right