return crypt($plainText, $salt);\r
}\r
\r
+/**\r
+ * Generates a random password for emailing to new users.\r
+ * User should be asked to change the password.\r
+ */\r
+function generatePassword()\r
+{\r
+ $random = file_get_contents("/dev/urandom", false, null, 0, 25);\r
+ return bin2hex($random);\r
+}\r
+\r
//Checks if an email is valid\r
function isValidEmail($email)\r
{\r