This topic is locked

Prevent Usage without Owner Supplied Username and/or password

10/26/2017 6:03:49 PM
PHPRunner General questions
J
justmelat author

Hi, i have my application almost complete. when i send the exe/zip file to someone -how do you keep the application from working unless user inserts a specific user/password when the application is first opened? Kind of like you guys do when the trial period has ended.

romaldus 10/26/2017

Do you mean send email with "exe/zip" attachment from phprunner app?

J
justmelat author 10/27/2017



Do you mean send email with "exe/zip" attachment from phprunner app?



I will have a site that requests the user to pay and provide email address. I will send them the zip file, or i may provide a download link. [not certain of exact process yet], but after they have received and download the zip file, and then installed the application, I want to request a username and/or password. That password would be provided by me [i will generate a unique random string for each user]. I want to be able to assign that string to each application. So I want something like [onLoad, check for unique string assigned to this application, if null, request it, if not null, validate it] so some variable has to hold the unique string and then match when the user imports. If match found, let application run as normal.

J
justmelat author 10/28/2017



I will have a site that requests the user to pay and provide email address. I will send them the zip file, or i may provide a download link. [not certain of exact process yet], but after they have received and download the zip file, and then installed the application, I want to request a username and/or password. That password would be provided by me [i will generate a unique random string for each user]. I want to be able to assign that string to each application. So I want something like [onLoad, check for unique string assigned to this application, if null, request it, if not null, validate it] so some variable has to hold the unique string and then match when the user imports. If match found, let application run as normal.



I thought I had a solution to this figured out, but ran into a glitch/issue.

  1. I added another field to the registration page -> Register page w/extra field
  2. Added a variable to the "Before registration" event that holds the hash/password
  3. when user requests and pays for app, they will be sent the hash/password, which they will enter into the hash/password field on the registration page and it must of course match the variable that I have set



When I test, by registering as a new user and adding the hash/password, hit submit/register button, the registration page just refreshes/reloads

If I remove the hash/password field, the registration process works normal. Why am I not able to add another field to the registration page?

H
headingwest 10/30/2017

I've added to the registration page with no problem. Do it in the passwords and security tab - select the fields you want. I guess you could also have a hidden field with default uniqid().
I think much better better adding into the "After successful Registration" event instead of showing the field on the page. You could use the PHP uniqid() function.

// this code is a mockup untested

$uniq = uniqid();

$sql = " insert into usertable (uniqid) values ('".$uniq."') where userid = " . $values['userid'];

DB::Exec($sql);


Then you can also mail them the uniqid. By saving it into the database you can resend it when they need it. Set the user security for the usertable to "can see own records" and add a button "resend key" on the usertable edit/view pages.