10
Quote:
if (strrpos($uname, ' ') > 0) {
$stop .= _US_NICKNAMENOSPACES."
";
IF
String positions 'space' in the user name is greater than zero, then stop.
Now, we are referring to the string position of jane" "doe. The space is ALWAYS going to equal = "20" the number to indicate a space to the computer and it is always greater than ">" zero. So we can depend on that code line to trap that space before it causes trouble.
Now the computer understands if it sees a space it is to sidetrack and go to the instructions in _US_NICKNAMENOSPACES and determine the appropiate route to take before completeing the command.
You may short circuit it, but for what purpose.
The code was put there to be compatable with what the computer and the program was designed to do.
Since they called the function US NICKNAME NO SPACES, I would think it was designed to tell us
US NICKNAMES should not have spaces. Programers do that with code to remember and give other programers a hint as to why they performed a particular function.
It is changeable, but unless you have a good reason for doing it I would leave it alone, you or I don't know what trouble it may cause further down the line. And to trouble shoot code later that has been manually changed from the original is unnecessarly hard.
That is only my opinion.
No better, no worse than anyone elses.