Creating 100s of uses automatically with preassigned passw?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Creating 100s of uses automatically with preassigned passw?

Post by KSan » 2013-06-02 20:14

Hi,

I have an app where I have records for 3rd parties who will participate in a particular event. The event organizer is super frustrated with the act of communicating with these 100s of 3rd parties, getting the details that need to be displayed in the app and then entering them in etc. I tried to help by offering imports into db through excel but we are swimming in a sea of excel edits, versions, messed up templates etc.

The solution is obvious. Create a user id for each 3rd party and give them access to just the record that covers their details so they can edit it and make it look like they want it. I think I have the knowledge (thanks to this forum) of how to limit a user to one record only so I am sure this setup can be made to work. The challenge is creating those 100s of user ids & passwords...

Any thoughts on how I can programmatically accomplish this? I would need to do something like this :

For each record in exhibitors table
1 - create a user id & random password
2 - make the user id member of a particular group
3 - write the userid into the allowedUser field in the exhibitors record. This field is what I will check and compare when user is back to edit the record.
4 - email the user id & random password & a direct link to edit the record that belongs to this user id to the email address that is in the exhibitors table record.
5 - if there is no email address on record for this user id then send the email above to the administrator for forwarding.

I think I know how to do 3, 4 & 5.

1 & 2 is the big question for me. Any thoughts? Thank you very much for your ideas.

Regards,
Kerem

User avatar
a.gneady
Site Admin
Posts: 1287
Joined: 2012-09-27 14:46
Contact:

Re: Creating 100s of uses automatically with preassigned pas

Post by a.gneady » 2013-06-04 00:44

Here is a tip to get started on 1 and 2: insert the user into the "membership_users" table as follows: username into the memberID field, password into the passMD5 field after hashing it using md5() function, group id into the groupID field.

You need a script that would create the random usernames and passwords, output them into may be a CSV file, and insert them into the membership_users table as explained above .. You can then use Word Merge or a similar utility to print out the user accounts from the CSV file.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: Creating 100s of uses automatically with preassigned pas

Post by KSan » 2013-06-04 05:17

Thanks. This is a good place to start. Will report back how far I get.

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: Creating 100s of uses automatically with preassigned pas

Post by toconnell » 2013-06-06 13:11

I would do it using a web form for the front end and your app gini database for the back end collecting the data.. just a simply HTML form would suffice and you can use that to create the accounts and the data updates.
Tina O'Connell
Web Dev & Appgini FAN

Post Reply