Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: stalin on April 17, 2021, 07:52:43 PM

Title: Registration without email
Post by: stalin on April 17, 2021, 07:52:43 PM
Some context: I'm new to PHP
I want my SMF site to only store email if the user selects to, (i.e registering does not require email).
How would I go about achieving this via modification of the default registration page?
Thank you in advance, and sorry if this is off topic
Title: Re: Registration without email
Post by: Kindred on April 17, 2021, 10:41:15 PM
No. Can't do it.
Smf requires email, especially since email is an alternative login method
Title: Re: Registration without email
Post by: Sir Osis of Liver on April 17, 2021, 11:37:23 PM
It's not difficult to make forum forget email address after registration.  It does remove some functionality.  Never tried making it a registration option.  Will have a look at that when I have some time.
Title: Re: Registration without email
Post by: Kindred on April 18, 2021, 07:49:31 PM
If you remove the email, every account has access to every other.

Email is an alternative login method. Don't remove it
Title: Re: Registration without email
Post by: Sir Osis of Liver on April 18, 2021, 09:34:31 PM
Quote from: Kindred on April 18, 2021, 07:49:31 PM
If you remove the email, every account has access to every other.

?
Title: Re: Registration without email
Post by: Kindred on April 19, 2021, 09:48:58 AM
email
1- must be unique (and deleting the email post registration makes the field the same (blank) for every account.
2- can be used to trigger lost password protocols...   If email is deleted, ANY user can trigger the "lost password" on ANY account...
3- can be used to login, in place of username... if email is deleted, ANY user could (in theory) login as ANY account....


in other words. DO NOT DELETE EMAIL in the member record.

Also, deleting email will trigger BUNCHES of errors if ANY user has ANY notifications.
Title: Re: Registration without email
Post by: Sir Osis of Liver on April 19, 2021, 12:54:42 PM
Quote from: Kindred on April 19, 2021, 09:48:58 AM
email
1- must be unique (and deleting the email post registration makes the field the same (blank) for every account.

That's the point, isn't it?

Quote
2- can be used to trigger lost password protocols...   If email is deleted, ANY user can trigger the "lost password" on ANY account...

That can be removed, would be one of the lost functions.  Can be replaced somewhat with contact form.  And doesn't password reset confirm valid email address before sending reset email?

Quote
3- can be used to login, in place of username... if email is deleted, ANY user could (in theory) login as ANY account....

I'd have to try that.  If field is blank, wouldn't email login fail?  And you'd still need password to login.

Quote
Also, deleting email will trigger BUNCHES of errors if ANY user has ANY notifications.

Notifications could be disabled (again, some lost funtionality).

I don't disagree that it's a bad idea, but should be doable.  IIRC (it's been a while) the hack I was playing with deleted email address when registration is activated.  Would be simple enough to replace the address with a randomized address, that should prevent bogus logins.
Title: Re: Registration without email
Post by: Kindred on April 19, 2021, 01:51:10 PM
almost anything is "doable" with enough coding knowledge.  In this case, it should not be done.  Period.

This is where we disagree on support.  You are happy to just hand a user anything, regardless of how bad an idea it truly is.

I'd rather find out WHY the user THINKS they need to do this thing and discuss a) a better way or b) why they should not do that thing instead of handing them something that they don't actually understand.
Title: Re: Registration without email
Post by: Sir Osis of Liver on April 19, 2021, 09:22:11 PM
Well, I don't know what they understand or not, and I did mention it's a bad idea, but it's interesting because it relates to something I tinkered with several years ago.  I understand it better now, and hopefully OP does as well.