diff options
author | Malf Furious <m@lfurio.us> | 2016-03-10 19:18:19 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-27 20:16:32 -0400 |
commit | f270bc774776dd5733ed4d76095281fa9210bac2 (patch) | |
tree | e3b038ae5ef5455046bed3f94366db4322353aa8 /app/class/user.class.php | |
parent | 2b8f6ae7ca3e8b18f80f2753d990425aa7fac820 (diff) | |
download | scrott-f270bc774776dd5733ed4d76095281fa9210bac2.tar.gz scrott-f270bc774776dd5733ed4d76095281fa9210bac2.zip |
Add function User::confirmEmailKey()
Validates the users supposed email key. If correct, sets the users emailConf flag.
Diffstat (limited to '')
-rw-r--r-- | app/class/user.class.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php index 6c8f46f..7d8519e 100644 --- a/app/class/user.class.php +++ b/app/class/user.class.php @@ -120,6 +120,18 @@ class User extends Object } /* + * Validate the email confirmation key for a user, returns true if correct, false otherwise. On success, $this->emailConf is also set to 1 + */ + function confirmEmailKey($key) + { + if ($key != $this->emailConfKey) + return false; + + $this->emailConf = 1; + return true; + } + + /* * Overwrite the salt and key for this user, given a new plaintext password */ function setPassword($password) |