Advertisement:

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004388SMF 2.1[SMF 3.0 "Saguaro"] public2010-07-21 09:252012-08-14 11:31
ReporterNorv 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0004388: Sort members awaiting deletion by last login
DescriptionAs the title says.
It makes no sense to sort them by registration date ... It should be replaced by last login date, THAT is helpful for the admin to decide which to approve.

Admin > Members > Awaiting approval.

(at most, both, though I don't see the real use of registration date anyway).
Additional InformationPointed out by Sleepy, from sm.org problems.
Tags2.1
Attached Files

- Relationships

-  Notes
(0012635)
Nao/Gilles (Viewer)
2010-07-21 14:40

Why Saguaro?
(0014447)
groundup (SMF Friend)
2012-02-28 21:29

This one is confusing me. In Subs-Members.php find
'default_sort_col' => 'date_registered',

replace with
'default_sort_col' => $context['current_filter'] == 4 ? 'mem.last_login' : 'date_registered',

Not sure if that will work at all, but it seems close.
(0014456)
emanuele (Developer)
2012-03-01 10:41

That's a good start because I didn't know about current_filter.

What I did is to use the same column and use it to show alternatively the registration date or the last log in date. Show the two columns is not possible (since the function is shared with approval and in case of approval would be useless).
Basically this is the code I used:
[code]
            'date_registered' => array(
                'header' => array(
                    'value' => $context['current_filter'] == 4 ? $txt['viewmembers_online'] : $txt['date_registered'],
                ),
                'data' => array(
                    'function' => create_function('$rowData', '
                        return timeformat($rowData[\'' . ($context['current_filter'] == 4 ? 'last_login' : 'date_registered') . '\']);
                    '),
                ),
                'sort' => array(
                    'default' => $context['current_filter'] == 4 ? 'mem.last_login DESC' : 'date_registered DESC',
                    'reverse' => $context['current_filter'] == 4 ? 'mem.last_login' : 'date_registered',
                ),
            ),
[/code]
(0014472)
emanuele (Developer)
2012-03-03 08:53
edited on: 2012-03-03 10:05

Commit: 147feb295d0224087d465071cf3cae624ad76431
Message: ! Members awaiting approval are sorted by last login date instead of registration date [Bug 4388]
Author: emanuele
Date: 01/03/2012

(0014482)
groundup (SMF Friend)
2012-03-05 18:01

Sounds good. Going to close it?
MantisBT 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group