Dependency injection on migration functions (uid parameter).

This commit is contained in:
nikolark committed 2011-08-20 01:44:46 +02:00
1 parent 2c64cd1d27
commit 3942e0535c
7 files changed
+23 -24

No files matched your search

+6 -7
View File
@@ -78,13 +78,12 @@ class User {
return false;
}
$this->password = $data['password1'];
if (!isAdmin()) {
switch (checkForumUsername($data['username'], $this->password)) {
case "wrong-password" :
notify("Brukernavnet er allerede i bruk på forumet. " . "Om du selv har dette brukernavnet må du oppgi " . "riktig passord.");
$this->id = -1;
return false;
}
/* Does the username chosen exist in the forum allready? */
if (!isAdmin() && checkForumUsername($data['username'], $this->password) == "wrong-password") {
notify("Brukernavnet er allerede i bruk på forumet. Om du selv har dette brukernavnet må du oppgi riktig passord.");
$this->id = -1;
return false;
}
$this->addresstype = isset ($data['addresstype']) ? "int" : "no";