summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-12 20:12:00 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-12 20:12:36 -0500
commited690615de8f6433a1a4d9a8fc7c28385af47d8a (patch)
tree62ad14f1af970f1fe3de55a5c732011128056f10 /classes/User.php
parentcefbad0159c6be0aa6e75c85dd2e4b9f1e412116 (diff)
Added a User_username table that links the external username with a StatusNet user_id
Added EmailAuthenticationPlugin Added ReverseUsernameAuthenticationPlugin Changed the StartChangePassword and EndChangePassword events to take a user, instead of a nickname User::allowed_nickname was declared non-static, but used as if it was static, so I made the declaration static
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/classes/User.php b/classes/User.php
index 9b90ce61b..9f1ee53f4 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -114,7 +114,7 @@ class User extends Memcached_DataObject
return $result;
}
- function allowed_nickname($nickname)
+ static function allowed_nickname($nickname)
{
// XXX: should already be validated for size, content, etc.
$blacklist = common_config('nickname', 'blacklist');
@@ -190,7 +190,17 @@ class User extends Memcached_DataObject
$profile->query('BEGIN');
+ if(!empty($email))
+ {
+ $email = common_canonical_email($email);
+ }
+
+ $nickname = common_canonical_nickname($nickname);
$profile->nickname = $nickname;
+ if(! User::allowed_nickname($nickname)){
+ common_log(LOG_WARNING, sprintf("Attempted to register a nickname that is not allowed: %s", $profile->nickname),
+ __FILE__);
+ }
$profile->profileurl = common_profile_url($nickname);
if (!empty($fullname)) {
@@ -242,6 +252,10 @@ class User extends Memcached_DataObject
}
}
+ if(isset($email_confirmed) && $email_confirmed) {
+ $user->email = $email;
+ }
+
// This flag is ignored but still set to 1
$user->inboxed = 1;