* @var boolean
*/
$authDebug = false;
+
+/**
+ * Optional prefix to create email addresses from user names.
+ * i.e. "@example.org" to create "user@example.org" email address
+ * from "user" username.
+ *
+ * @var string
+ */
+$authEmailSuffix = null;
?>
}
$ok = $this->loginAuth($username, $password);
- $password = $this->sanitisePassword($password);
- $id = $this->getIdFromUser($username);
- //FIXME: check against auth
+ if (!$ok) {
+ return false;
+ }
+
+ //utilize real login method to get longtime cookie support etc.
+ return parent::login($username, $password, $remember);
}
if (!$this->getUserByUsername($username)) {
$this->addUser(
$username, $password,
- $username . '@' . $GLOBALS['authemaildomain']
+ $username . $GLOBALS['authEmailSuffix']
);
}
//FIXME: what if the user changed his password?