Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email capture instead of voucher? #2

Open
spott opened this issue May 30, 2023 · 4 comments
Open

Email capture instead of voucher? #2

spott opened this issue May 30, 2023 · 4 comments

Comments

@spott
Copy link

spott commented May 30, 2023

How hard would it be to add an email capture instead of having a voucher?

Essentially a box that takes an email address, and if filled out lets you access the wifi.

@Carlgo11
Copy link
Owner

Hello Andrew,
it would take some moderate to light redevelopment to implement that for this project but I know UniFi's default guest portal system already supports what you're describing.

What would the use case be though? I'd imagine you'd get a pretty unusable dataset of different fake email addresses if the addresses aren't verified, which they of course can't be without first granting the user access to the internet.

@spott
Copy link
Author

spott commented May 31, 2023

I was under the impression that Unifi's default guest portal didn't offer just capturing emails (there are a number of services out there that offer paid solutions for guest portals using emails, which leads me to believe there is something lacking in Unifi's offering), but you have intrigued me enough to recheck that assumption.

I imagine there is going to be a fair amount of junk, but it is just for marketing purposes, so not a huge deal. If they get a 50% junk rate they would probably be happy (and there are a number of services out there that attempt to validate emails without sending one and getting a response, which might be useful if they are just getting junk).

I've taken a look, and I think I can hack the code to offer this option, but I'm not familiar enough with PHP to be able to integrate it nicely with the rest of the code... so it probably won't be able to be pushed back upstream... :(.

I'll still submit a pull request and you can try and untangle what I did if it is interesting to you.

@Carlgo11
Copy link
Owner

Carlgo11 commented Jun 1, 2023

I was under the impression that Unifi's default guest portal didn't offer just capturing emails

Just checked and you're right. I'm rather certain they did previously allow for form customization in their guest portal which did allow for an email input. I wonder why they removed that feature. 🤔

Regarding this project,
I'm afraid I don't have the time to write the changes you're looking for but wish you the best of luck in your endeavor!
I'd suggest you focus on just the contents of src/ as the rest is frontend files that I suggest you rewrite in your own language of choice.
The code should be fairly straight forward with UniFi.php being the root class, Voucher.php being responsible for how a voucher looks, and GuestPortal.php being the glue between the frontend and backend.

If you need help I could probably write a clone of this project with email support for like $50 or if you need something a bit more professional I'd recommend Art of WiFi.
I'm available for free if you have any questions regarding the existing code though. Just drop me an email if that's the case.

Best of luck!

@spott
Copy link
Author

spott commented Jun 2, 2023

Thanks for the help.

I'll keep your offer of writing a clone of this project on the table if I need it. But at the moment, I think I have it (famous last words...), I'm just struggling with the Unify/Apple component of it (I think my apple devices aren't using the portal because it doesn't have ssl and I'm not sure how to get around that.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants