summaryrefslogtreecommitdiffstats
path: root/app/class/user.class.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-03-10 19:09:50 -0500
committerMalf Furious <m@lfurio.us>2016-03-27 20:16:32 -0400
commit2b8f6ae7ca3e8b18f80f2753d990425aa7fac820 (patch)
tree98c76a8c0819e7af4fa7ec40ed751aa7f05666e0 /app/class/user.class.php
parent798cd5d80385705503c81be269c008e163fcbdba (diff)
downloadscrott-2b8f6ae7ca3e8b18f80f2753d990425aa7fac820.tar.gz
scrott-2b8f6ae7ca3e8b18f80f2753d990425aa7fac820.zip
Add function User::setEmail()
This function handles internal vars while updating a user's email address.
Diffstat (limited to '')
-rw-r--r--app/class/user.class.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php
index 75b769a..6c8f46f 100644
--- a/app/class/user.class.php
+++ b/app/class/user.class.php
@@ -100,8 +100,7 @@ class User extends Object
$this->name = $username;
$this->type = "user";
$this->setPassword($password);
- $this->emailConf = 0;
- $this->emailConfKey = $this->getBlob();
+ $this->setEmail("");
$this->saveObj();
@@ -130,6 +129,16 @@ class User extends Object
}
/*
+ * Overwrite the emailConfKey and flag, and change user's saved email address
+ */
+ function setEmail($email)
+ {
+ $this->email = $email;
+ $this->emailConf = 0;
+ $this->emailConfKey = $this->getBlob();
+ }
+
+ /*
* If a user has an alias set, display it instead of their username
*/
function getDisplayName()