summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php16
-rw-r--r--classes/statusnet.ini10
2 files changed, 25 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;
diff --git a/classes/statusnet.ini b/classes/statusnet.ini
index 912d05cdf..19ab7bf97 100644
--- a/classes/statusnet.ini
+++ b/classes/statusnet.ini
@@ -566,3 +566,13 @@ modified = 384
user_id = K
token = K
+[user_username]
+user_id = 129
+provider_name = 130
+username = 130
+created = 142
+modified = 384
+
+[user_username__keys]
+provider_name = K
+username = K