Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3101671
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3101671
Commits
806d0f53
Commit
806d0f53
authored
18 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
Forward prot from 4.7
#60907
, better patch by Zen and dww
parent
39c68013
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/user.module
+9
-2
9 additions, 2 deletions
modules/user.module
modules/user/user.module
+9
-2
9 additions, 2 deletions
modules/user/user.module
with
18 additions
and
4 deletions
modules/user.module
+
9
−
2
View file @
806d0f53
...
@@ -923,8 +923,15 @@ function user_login_validate($form_id, $form_values) {
...
@@ -923,8 +923,15 @@ function user_login_validate($form_id, $form_values) {
function
user_login_submit
(
$form_id
,
$form_values
)
{
function
user_login_submit
(
$form_id
,
$form_values
)
{
global
$user
;
global
$user
;
if
(
$user
->
uid
)
{
if
(
$user
->
uid
)
{
// sometimes modules call this function during a bootstrap so we don't use t() here
// To handle the edge case where this function is called during a
watchdog
(
'user'
,
"Session opened for "
.
check_plain
(
$user
->
name
));
// bootstrap, check for the existence of t().
if
(
function_exists
(
't'
))
{
$message
=
t
(
'Session opened for %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$user
->
name
)));
}
else
{
$message
=
"Session opened for "
.
check_plain
(
$user
->
name
);
}
watchdog
(
'user'
,
$message
);
// Update the user table timestamp noting user has logged in.
// Update the user table timestamp noting user has logged in.
db_query
(
"UPDATE
{
users
}
SET login = %d WHERE uid = %d"
,
time
(),
$user
->
uid
);
db_query
(
"UPDATE
{
users
}
SET login = %d WHERE uid = %d"
,
time
(),
$user
->
uid
);
...
...
This diff is collapsed.
Click to expand it.
modules/user/user.module
+
9
−
2
View file @
806d0f53
...
@@ -923,8 +923,15 @@ function user_login_validate($form_id, $form_values) {
...
@@ -923,8 +923,15 @@ function user_login_validate($form_id, $form_values) {
function
user_login_submit
(
$form_id
,
$form_values
)
{
function
user_login_submit
(
$form_id
,
$form_values
)
{
global
$user
;
global
$user
;
if
(
$user
->
uid
)
{
if
(
$user
->
uid
)
{
// sometimes modules call this function during a bootstrap so we don't use t() here
// To handle the edge case where this function is called during a
watchdog
(
'user'
,
"Session opened for "
.
check_plain
(
$user
->
name
));
// bootstrap, check for the existence of t().
if
(
function_exists
(
't'
))
{
$message
=
t
(
'Session opened for %name.'
,
array
(
'%name'
=>
theme
(
'placeholder'
,
$user
->
name
)));
}
else
{
$message
=
"Session opened for "
.
check_plain
(
$user
->
name
);
}
watchdog
(
'user'
,
$message
);
// Update the user table timestamp noting user has logged in.
// Update the user table timestamp noting user has logged in.
db_query
(
"UPDATE
{
users
}
SET login = %d WHERE uid = %d"
,
time
(),
$user
->
uid
);
db_query
(
"UPDATE
{
users
}
SET login = %d WHERE uid = %d"
,
time
(),
$user
->
uid
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment