New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ticket/12380] Sort Remember Me keys by last login time in UCP #2281
Conversation
@@ -672,7 +672,8 @@ function main($id, $mode) | |||
|
|||
$sql = 'SELECT key_id, last_ip, last_login | |||
FROM ' . SESSIONS_KEYS_TABLE . ' | |||
WHERE user_id = ' . (int) $user->data['user_id']; | |||
WHERE user_id = ' . (int) $user->data['user_id'] . ' | |||
ORDER BY last_login'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please explicitly include sorting direction
Updated |
@@ -672,7 +672,8 @@ function main($id, $mode) | |||
|
|||
$sql = 'SELECT key_id, last_ip, last_login | |||
FROM ' . SESSIONS_KEYS_TABLE . ' | |||
WHERE user_id = ' . (int) $user->data['user_id']; | |||
WHERE user_id = ' . (int) $user->data['user_id'] . ' | |||
ORDER BY last_login ASC'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you pick the sorting direction arbitrarily? I am wondering whether DESC makes more sense, "last used first".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I figured oldest at the top of the list made most sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also make the column names clickable and allow sorting by all 3 values in both directions.
Otherwise I would prefer DESC aswell, then you can start checking the "mark" box starting at a certain date rather then stop :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed that on IRC. I think making columns sortable is overkill. loginkeys is not an important list. there usually won't be many loginkeys listed. and its not like a user NEEDS to have them sorted either upwards or downwards for any reason.
I figured oldest at top made sense, because those would be the first ones a user would delete… so they can work their way down the list until they reach their most recent login keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah just read it. Fine by me.
https://tracker.phpbb.com/browse/PHPBB3-12380
PHPBB3-12380