[geeklog-cvs] geeklog: Create a nice username for LinkedIn OAuth users
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Apr 30 08:55:03 EDT 2011
changeset 8264:0813a4eb4c7c
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/0813a4eb4c7c
user: Dirk Haun <dirk at haun-online.de>
date: Sat Apr 30 14:54:55 2011 +0200
description:
Create a nice username for LinkedIn OAuth users
diffstat:
system/classes/oauth/linkedin.auth.class.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r ead50f1083ca -r 0813a4eb4c7c system/classes/oauth/linkedin.auth.class.php
--- a/system/classes/oauth/linkedin.auth.class.php Fri Apr 29 19:20:04 2011 -0400
+++ b/system/classes/oauth/linkedin.auth.class.php Sat Apr 30 14:54:55 2011 +0200
@@ -50,7 +50,7 @@
protected function _getCreateUserInfo($info) {
$users = array(
- 'loginname' => $info->id,
+ 'loginname' => $info->{'first-name'} . $info->{'last-name'},
'email' => '',
'passwd' => '',
'passwd2' => '',
@@ -60,6 +60,7 @@
'remoteservice' => 'oauth.linkedin',
'remotephoto' => $info->{'picture-url'},
);
+ $users['loginname'] = str_replace(' ', '', $users['loginname']);
return $users;
}
@@ -73,4 +74,4 @@
}
-?>
\ No newline at end of file
+?>
More information about the geeklog-cvs
mailing list