Could someone please tell me what the function of $pass2 is?
The only person who could provide the definitive answer on that one would be the author of the MU package... Bakercad.
However, using a bit of exploratory deduction in the snewsMU.php file, we might be able to figure it out for ourselves... by searching through Bakercad's
function bulk_users() .
The first occurence in that function is where the
$pass2 variable is defined as -
trim(
$_POST[
'password2']);
The next occurence of
$pass2 is in the same function... a few more lines down... in this string -
if (
$pass1 ===
$pass2) . This string is saying... "If
password1 is equal to
password2... and they are of the same type... " then let's do something which follows the string.
Now... what does this
function bulk_users() do? When you are logged in as the Admin... and you click the "Add Users" link to add a new user account... you get the "Add Users" panel displayed. This is generated by this function. Now... notice that there are 2 password fields in the form. The "Password" (1st) field is for password1 and the second field - "Repeat Password" is for password2.
Two are used so that the person... if registering a new account on their own... must enter their password twice. I think this is to ensure that the fields are being filled in by a real legitimate person and not a spambot. And... that
if (
$pass1 ===
$pass2) begins a process that checks to make sure both password entries are the same. If they are not the same... then the registration entry is rejected. If they do check out to be the same... then it is accepted and saved to the database.
