Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a44341a8
Commit
a44341a8
authored
Jan 27, 2008
by
Gábor Hojtsy
Browse files
#208888
by jvandyk: set access time when externally authenticated user first logs in
parent
d40bb1e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
a44341a8
...
...
@@ -324,7 +324,7 @@ function user_save($account, $array = array(), $category = 'account') {
// must abort to avoid overwirting their account.
return
FALSE
;
}
// Build the initial user object.
$array
[
'uid'
]
=
db_last_insert_id
(
'users'
,
'uid'
);
$user
=
user_load
(
array
(
'uid'
=>
$array
[
'uid'
]));
...
...
@@ -1361,7 +1361,14 @@ function user_external_login_register($name, $module) {
$user
=
user_load
(
array
(
'name'
=>
$name
));
if
(
!
isset
(
$user
->
uid
))
{
// Register this new user.
$userinfo
=
array
(
'name'
=>
$name
,
'pass'
=>
user_password
(),
'init'
=>
$name
,
'status'
=>
1
,
"authname_
$module
"
=>
$name
);
$userinfo
=
array
(
'name'
=>
$name
,
'pass'
=>
user_password
(),
'init'
=>
$name
,
'status'
=>
1
,
"authname_
$module
"
=>
$name
,
'access'
=>
time
()
);
$account
=
user_save
(
''
,
$userinfo
);
// Terminate if an error occured during user_save().
if
(
!
$account
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment