| 
 | 
  Martin Samler - 2005-01-27 14:15:04  
In order to make sure that a user always appears as registered  
(f.ex. not "Martin" as "MaRtIn") I propose the following change to the check_user function: 
 
if (mysql_result($result, 0, "test") == 1) { 
   $sql=sprintf("SELECT login FROM %s WHERE login = '%s'", $this->table_name, $this->user); 
   $result = mysql_query($sql); 
   $this->user = mysql_result($result, 0, "login"); 
   return true; 
} else { 
   return false; 
} 
 
Am I going wrong here? 
 
Martin 
  
  Olaf Lederer - 2005-01-28 07:18:03 -  In reply to message 1 from Martin Samler 
Hallo Martin, 
 
First, thanks for your help to make this class better... 
 
I checked the register method, I have an active account with the login name "olederer" and I try to create a new one like "OledereR". After submitting the form the class reported that a user with this name already exists. Is this what you mean? 
 
Dou you want to have both login names as possible? 
  
  Martin Samler - 2005-01-28 15:32:07 -  In reply to message 2 from Olaf Lederer 
No, Olaf, that is not it. It is only about appearance. 
 
If I am registered as "MarTin", I want to be recognized and greated as "MarTin" even if I sign in as "MARTIN" or "martin". This is also relevant if I post new messages in a forum, f.ex.. 
 
Of course, I could just query the database, but it seems simpler to have the class assign the correct format to $_SESSION['user'] - as it will do with the suggested modification.  
 
Best regard, 
Martin 
 
  
  Olaf Lederer - 2005-01-28 21:15:24 -  In reply to message 3 from Martin Samler 
Ok, I understand, normally I like to say hello with the real name (and only the login if real name is empty). 
 
I will check this and keep you informed... 
 
By the way i have already a long developement list :-( 
  
  Olaf Lederer - 2005-01-28 22:43:48 -  In reply to message 4 from Olaf Lederer 
... I'm al little surprised that if you have registered as "Access" that's possible to login with ACCESS.... 
  
  Olaf Lederer - 2005-01-28 22:54:29 -  In reply to message 5 from Olaf Lederer 
I have it... 
 
change the last statement like this: (BINARY is new) 
 
$sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE BINARY login = '%s' AND pw = '%s' AND active = 'y'", $this->table_name, $this->user, $pass); 
 
Now you "have to" use the "unique" login like accepted. 
 
I will add this changes to the next (bigger) update. 
  
  Martin Samler - 2005-01-28 23:26:26 -  In reply to message 5 from Olaf Lederer 
Yes, but that is just fine, I think. It is more userfriendly not to make the login case sensitive. 
 
As for using the real name, I like to grant users the choice of anonymity, even though I do require a real name for the registration of users with a certain access level. For those who want to supply a profile, I intend to add some extra fields in the 'user' table. 
 
I am wondering if there is any safe way to prevent folks from registering multiple times with different e-mail addresses. Hate it when people debate themselves on messageboards. Probably not... allthough using ccokies could make it a little harder. 
 
I'm looking forward to your updates. Problem is, the further I progress with my new site, the harder it is to replace the class. A detailed documentation of changes including linenumbers would help ;)  
  
  Olaf Lederer - 2005-01-29 09:36:32 -  In reply to message 7 from Martin Samler 
Hallo Martin, 
Right a case sensitive login is not so user friendly, but think about the windows logon. 
 
Additional fields should be placed in a separate table (like in the big message boards) I think about to write en extension for this but I have no idea when. 
 
The registering multiple times,  
If this happen in a forum I should safe the user’s IP address in post table, and then it protect the posting function. 
 
Yes you are right, I have member system created for a test with one of the first version’s. I hope the class is so flexible that I can it without modifications  
 
Of course I will report the changes but only with methods name like before. 
 
  
   |