|
|
Posted 22/09/2005 09:43:59 |
|
|
Junior Member
      
Group: Customers
Last Login: 06/10/2006 05:59:33
Posts: 25,
Visits: 122
|
|
| The InstantForum does not work well if a blank username is present. I am not asking to re-write the forum logic, but to generate a username if empty when the user logins by email. I think this will be a great feature for third party components to fully use the forum. Scenario Each customer can request a 30-day evaluation key for my product. The key is sent by email. I use the forum database to keep those emails, however I do not create a username because 99% of them will never post to the forum. Problems Associated With a Blank Username It is now a problem because many users do write private messages while their username is still undefined. With a blank username, it is impossible to communicate back to those users. Another annoying thing is the impossibility to view the user's profile if the username is blank. Solution I am thinking of modifying the code to generate a username when the customer logins by email. If you have any suggestions to do this, please let me know. Let me know if you consider to implement this feature, so I won't have to do it. Thanks
-- Daniel Morin GenoPro Genealogy Software http://www.genopro.com/
|
|
|
|
Posted 22/09/2005 10:26:47 |
|
|
Supreme Being
      
Group: Customers
Last Login: 22/09/2008 15:59:25
Posts: 693,
Visits: 2,418
|
|
I thought the 'username' was a required field upon registration in InstantForum v4.0? If so, how can you have registered members with no username field entry?
I must not be understanding...
It's more a question for InstantASP anyway, but I'm just curious...
..:: Bare ::.. http://www.livingformetal.com
|
|
|
|
Posted 22/09/2005 10:36:50 |
|
|
Supreme Being
      
Group: Moderators
Last Login: 14/10/2008 15:36:31
Posts: 582,
Visits: 876
|
|
| I cant think of any good reason that you'd even ALLOW it IF you are NOT required to enter that field (which I agree with Bare is required). Seems like you're trying to implement a code solution for a USER problem.
Mark 'Rigger82' Christianson US Paratrooper & Webmaster of Paratrooper.net http://www.paratrooper.net
|
|
|
|
Posted 22/09/2005 23:14:17 |
|
|
Junior Member
      
Group: Customers
Last Login: 06/10/2006 05:59:33
Posts: 25,
Visits: 122
|
|
Bare (9/22/2005) I thought the 'username' was a required field upon registration in InstantForum v4.0? If so, how can you have registered members with no username field entry?You are right. The problem is the user is automatically registered via the IF API when requesting an evaluation key for my product. The automatic registration leaves the username blank so the user can pick his/her own. Also, most of the registered users will never post to the forum, so they don't need a username.
-- Daniel Morin GenoPro Genealogy Software http://www.genopro.com/
|
|
|
|
Posted 23/09/2005 09:28:33 |
|
|
Supreme Being
      
Group: Moderators
Last Login: 14/10/2008 15:36:31
Posts: 582,
Visits: 876
|
|
Then why not just park anything in there (random) or just use thier email or some other bit of information you have from them.
Mark 'Rigger82' Christianson US Paratrooper & Webmaster of Paratrooper.net http://www.paratrooper.net
|
|
|
|
Posted 23/09/2005 10:52:15 |
|
|
Supreme Being
      
Group: Customers
Last Login: 19/11/2007 22:07:59
Posts: 161,
Visits: 2,483
|
|
| Something like the following would assure unique usernames: EMAIL: name@domain.com USERNAME: DomainCom-Name Of course, this would publicize an email address...but not in such a way that bots would recognize it. Regardless, you need to be careful with privacy issues regarding the creation of a name in this manner. Or, you could just do something like this: USERNAME: Name### Where ### is a sequential number starting with 1. If Name1 exists, try Name2. If Name2 exists, try Name3, etc...
Al Bsharah Free Stores - http://www.aholics.com
|
|
|
|
Posted 23/09/2005 18:16:33 |
|
|
Junior Member
      
Group: Customers
Last Login: 06/10/2006 05:59:33
Posts: 25,
Visits: 122
|
|
AL (aholics.com) (9/23/2005) Of course, this would publicize an email address...but not in such a way that bots would recognize it. Regardless, you need to be careful with privacy issues regarding the creation of a name in this manner.I don't want to display the email address because of privacy and spam. I am thinking of displaying the email if the username is empty for the Administrator (myself). This way, I will be able to contact those individuals if needed.
-- Daniel Morin GenoPro Genealogy Software http://www.genopro.com/
|
|
|
|
Posted 24/09/2005 10:02:42 |
|
|
Supreme Being
      
Group: Moderators
Last Login: 14/10/2008 15:36:31
Posts: 582,
Visits: 876
|
|
| Why not generate a random username, there are .net tools out there to help. http://aspalliance.com/703 <-- random passphrase generation
I found this function for random strings Private Function RandomStringGenerator(ByVal intLen As Integer) As String Dim r As New Random Dim i As Integer Dim strTemp As String For i = 0 To intLen strTemp = strTemp & Chr(Int((26 * r.NextDouble()) + 65)) Next Return strTemp End Function
Mark 'Rigger82' Christianson US Paratrooper & Webmaster of Paratrooper.net http://www.paratrooper.net
|
|
|
|
Posted 24/09/2005 10:29:04 |
|
|
Junior Member
      
Group: Customers
Last Login: 06/10/2006 05:59:33
Posts: 25,
Visits: 122
|
|
This is a good idea. A random username would solve the problem and force the user to pick a better name  Thanks for the code sample. I am already using a similar method to generate passwords with the following code in InstantASP.Common\InstantASP.Common\Components\User.vb: Public Function GenerateAndSetNewPassword() As String Dim sPassword As String sPassword = InstantASP.Common.Text.Generators.RandomAlphaNumeric(8, True) SetPassword(sPassword) Return sPassword End Function
-- Daniel Morin GenoPro Genealogy Software http://www.genopro.com/
|
|
|
|