Code Duplication    Length = 7-7 lines in 2 locations

newsbythisauthor.php 1 location

@@ 105-111 (lines=7) @@
102
        $authname = $thisuser->getVar('uname');
103
        break;
104
105
    case 2: // Display full name (if it is not empty)
106
        if ('' == xoops_trim($thisuser->getVar('name'))) {
107
            $authname = $thisuser->getVar('uname');
108
        } else {
109
            $authname = $thisuser->getVar('name');
110
        }
111
        break;
112
113
    case 3: // Nothing
114
        $authname = '';

whoswho.php 1 location

@@ 58-64 (lines=7) @@
55
                $uname = $one_user->getVar('uname');
56
                break;
57
58
            case 2: // Display full name (if it is not empty)
59
                if ('' !== xoops_trim($one_user->getVar('name'))) {
60
                    $uname = $one_user->getVar('name');
61
                } else {
62
                    $uname = $one_user->getVar('uname');
63
                }
64
                break;
65
        }
66
        $xoopsTpl->append('whoswho', [
67
            'uid'            => $one_user->getVar('uid'),