# HG changeset patch # User Dan # Date 1239658104 14400 # Node ID 44302dd20d62bacebfeb7daf502eab574920cceb # Parent 44851d7e9bda7c06a2cd54c39bd1c63191eab5d1 Memberlist now shows rank instead of user level in "Title" column. (thanks mm3) diff -r 44851d7e9bda -r 44302dd20d62 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Mon Apr 13 16:57:20 2009 -0400 +++ b/plugins/SpecialUserFuncs.php Mon Apr 13 17:28:24 2009 -0400 @@ -1987,6 +1987,7 @@ { global $db, $session, $paths, $template, $plugins; // Common objects global $lang; + /* switch ( $level ) { case USER_LEVEL_GUEST: @@ -2001,6 +2002,13 @@ default: $s_level = $lang->get('userfuncs_ml_level_unknown', array( 'level' => $level )); } + */ + + // TODO: Requested by mm3. Is this too CPU-intensive? Optimize? + // Performance yield =/= about the same (but only 4 users under testing conditions) + $rankdata = $session->get_user_rank($row['user_id']); + $s_level = '' . $lang->get($rankdata['rank_title']) . ''; + return $s_level; } function email($addy, $row)