chamilo/chamilo-lms

View on GitHub
public/main/admin/user_list.php

Summary

Maintainability
A
0 mins
Test Coverage

The function modify_filter() has an NPath complexity of 3386880. The configured NPath complexity threshold is 200.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The function prepare_user_sql_query() has an NPath complexity of 101601976320. The configured NPath complexity threshold is 200.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Missing class import via use statement (line '336', column '27').
Open

        $extraField = new ExtraField('user');
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method prepare_user_sql_query uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $result = UserManager::get_extra_user_data_by_value($variable, $value, true);
                    }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method prepare_user_sql_query uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $sql .= !str_contains($sql, 'WHERE') ? ' WHERE u.active <> '.USER_SOFT_DELETED : ' AND u.active <> '.USER_SOFT_DELETED;
    }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method prepare_user_sql_query uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $sql .= 'u.lastname AS col3, u.firstname AS col4, ';
        }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $result .= Display::getMdiIcon(
                'pencil',
                'ch-tool-icon-disabled',
                null,
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $result .= Display::getMdiIcon(
            'star',
            'ch-tool-icon-disabled',
            null,
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $result .= Display::getMdiIcon('account-key', 'ch-tool-icon-disabled', null, 22, get_lang('Login as'));
        }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $result .= Display::getMdiIcon('account-key', 'ch-tool-icon-disabled', null, 22, get_lang('Login as'));
            }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method prepare_user_sql_query uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $sql .= 'SELECT u.id AS col0, u.official_code AS col2, ';

        if (api_is_western_name_order()) {
            $sql .= 'u.firstname AS col3, u.lastname AS col4, ';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method prepare_user_sql_query uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $values = [$_GET['extra_'.$variable]];
                }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $result .= Display::getMdiIcon('account-key', 'ch-tool-icon-disabled', null, 22, get_lang('Login as'));
    }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if ($current_user_status_label == $statusname[DRH] ||
                UserManager::is_admin($user_id) ||
                $current_user_status_label == $statusname[STUDENT_BOSS]
            ) {
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $result .= Display::getMdiIcon(
                    'delete',
                    'ch-tool-icon-disabled',
                    null,
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $result .= Display::getMdiIcon('information', 'ch-tool-icon-disabled', null, 22, get_lang('Information'));
        }
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method modify_filter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $result .= '<a href="../my_space/myStudents.php?student='.$user_id.'">'.
            Display::getMdiIcon(
                'chart-box',
                'ch-tool-icon',
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid unused parameters such as '$params'.
Open

function user_filter($name, $params, $row)
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$row'.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$params'.
Open

function active_filter(int $active, string $params, array $row): string
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

The parameter $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $url_params is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $number_of_items is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $user_id is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $url_params is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Consider putting global function "get_number_of_users" in a static class
Open

function get_number_of_users(bool $showDeletedUsers = false): int

Variable "number_of_items" is not in valid camel caps format
Open

    $number_of_items = (int) $number_of_items;

Variable "user_id" is not in valid camel caps format
Open

        if ($user_id != $currentUserId &&

Variable "user_is_anonymous" is not in valid camel caps format
Open

                !$user_is_anonymous &&

Variable "url_params" is not in valid camel caps format
Open

            $deleteUrl = "user_list.php?$url_params&"

Variable "current_user_status_label" is not in valid camel caps format
Open

                $current_user_status_label == $statusname[STUDENT_BOSS]

Consider putting global function "active_filter" in a static class
Open

function active_filter(int $active, string $params, array $row): string

Variable "status_options" is not in valid camel caps format
Open

$status_options[SESSIONADMIN] = get_lang('Course sessionsAdmin');

Variable "status_options" is not in valid camel caps format
Open

    $status_options

Variable "query_admin_table" is not in valid camel caps format
Open

        $query_admin_table = '';

Variable "keyword_extra_value" is not in valid camel caps format
Open

        $sql .= " $keyword_admin $keyword_extra_value ";

Expected 2 spaces after parameter type; 1 found
Open

 * @param   array $row Row of elements to alter

Variable "user_id" is not in valid camel caps format
Open

                            'user_id' => $user_id,

Variable "user_id" is not in valid camel caps format
Open

        if ($user_id != $currentUserId &&

Variable "user_is_anonymous" is not in valid camel caps format
Open

            !$user_is_anonymous &&

Variable "current_user_status_label" is not in valid camel caps format
Open

        if ($current_user_status_label == $statusname[SESSIONADMIN]) {

Variable "tool_name" is not in valid camel caps format
Open

    $tool_name = get_lang('User list');

Variable "user_id" is not in valid camel caps format
Open

                                if (UserManager::disable($user_id)) {

Variable "_admins_list" is not in valid camel caps format
Open

Session::write('admin_list', $_admins_list);

Variable "status_options" is not in valid camel caps format
Open

$status_options[DRH] = get_lang('Human Resources Manager');

Variable "active_group" is not in valid camel caps format
Open

$active_group[] = $form->createElement('checkbox', 'keyword_inactive', '', get_lang('Inactive'));

Variable "url_params" is not in valid camel caps format
Open

    $deleteUrl = "user_list.php?$url_params&".

Variable "user_is_anonymous" is not in valid camel caps format
Open

            !$user_is_anonymous &&

Variable "user_id" is not in valid camel caps format
Open

            api_global_admin_can_edit_admin($user_id)

Variable "user_id" is not in valid camel caps format
Open

            if ($user_id != $currentUserId &&

Variable "user_id" is not in valid camel caps format
Open

                UserManager::is_admin($user_id) ||

Variable "number_of_affected_users" is not in valid camel caps format
Open

                                    $number_of_affected_users++;

Variable "user_id" is not in valid camel caps format
Open

                        foreach ($_POST['id'] as $index => $user_id) {

Variable "user_table" is not in valid camel caps format
Open

        $sql .= "SELECT COUNT(u.id) AS total_number_of_items FROM $user_table u";

Expected 8 spaces after parameter name; 1 found
Open

 * @param   array $row Row of elements to alter

Variable "user_id" is not in valid camel caps format
Open

            api_get_path(WEB_CODE_PATH).'skills/assign.php?'.http_build_query(['user' => $user_id])

Variable "user_id" is not in valid camel caps format
Open

            api_global_admin_can_edit_admin($user_id, null, true)

Variable "user_id" is not in valid camel caps format
Open

                        'user_id' => $user_id,

Variable "user_id" is not in valid camel caps format
Open

            if ($current_user_status_label == $statusname[DRH] || UserManager::is_admin($user_id)) {

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Variable "expiration_time" is not in valid camel caps format
Open

            $expiration_time = api_strtotime($user['exp']);

Variable "_admins_list" is not in valid camel caps format
Open

    $_admins_list = Session::read('admin_list', []);

Variable "user_id" is not in valid camel caps format
Open

        $result .= '<a href="../my_space/myStudents.php?student='.$user_id.'">'.

Variable "user_id" is not in valid camel caps format
Open

                $result = UrlManager::add_user_to_url($user_id, $urlId);

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Variable "_admins_list" is not in valid camel caps format
Open

$_admins_list = array_keys(UserManager::get_all_administrators());

Variable "keyword_extra_value" is not in valid camel caps format
Open

        $keyword_extra_value = '';

Expected 4 spaces after parameter type; 1 found
Open

 * @param   int $user_id The user id

Variable "user_is_anonymous" is not in valid camel caps format
Open

    $user_is_anonymous = false;

Variable "user_is_anonymous" is not in valid camel caps format
Open

        if (!$user_is_anonymous) {

Variable "user_is_anonymous" is not in valid camel caps format
Open

        if (!$user_is_anonymous &&

Variable "user_id" is not in valid camel caps format
Open

                    "dashboard_add_users_to_user.php?user={$user_id}",

Variable "user_id" is not in valid camel caps format
Open

                $user_id = $_REQUEST['user_id'];

Variable "user_info" is not in valid camel caps format
Open

                    $message = get_lang('The user has been added').' '.$user_info['complete_name_with_username'];

Expected 1 space after FUNCTION keyword; 0 found
Open

    function() use ($showDeletedUsers) { return get_number_of_users($showDeletedUsers); },

Variable "user_table" is not in valid camel caps format
Open

                FROM $user_table u";

Variable "admin_table" is not in valid camel caps format
Open

            $query_admin_table = " , $admin_table a ";

Variable "current_user_status_label" is not in valid camel caps format
Open

    if ($current_user_status_label != $statusname[STUDENT]) {

Consider putting global function "status_filter" in a static class
Open

function status_filter(int $status): string

Variable "user_id" is not in valid camel caps format
Open

                    $user_info = api_get_user_info($user_id);

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    $number_of_affected_users = 0;

Variable "user_id" is not in valid camel caps format
Open

                            if ($user_id != $currentUserId) {

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Variable "number_of_affected_users" is not in valid camel caps format
Open

                                    $number_of_affected_users++;

Variable "status_options" is not in valid camel caps format
Open

$status_options[STUDENT_BOSS] = get_lang('RoleStudentBoss');

Variable "admin_table" is not in valid camel caps format
Open

    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);

Variable "query_admin_table" is not in valid camel caps format
Open

        $sql .= " $query_admin_table

Variable "number_of_items" is not in valid camel caps format
Open

    $sql .= " LIMIT $from, $number_of_items";

Consider putting global function "modify_filter" in a static class
Open

function modify_filter($user_id, $url_params, $row): string

Variable "current_user_status_label" is not in valid camel caps format
Open

    if ($current_user_status_label == $statusname[ANONYMOUS]) {

Variable "url_params" is not in valid camel caps format
Open

                $deleteUrl = "user_list.php?$url_params&"

Variable "user_id" is not in valid camel caps format
Open

                                if (UserManager::delete_user($user_id)) {

Variable "active_group" is not in valid camel caps format
Open

$active_group[] = $form->createElement('checkbox', 'keyword_active', '', get_lang('Active'));

Variable "this_section" is not in valid camel caps format
Open

$this_section = SECTION_PLATFORM_ADMIN;

Variable "keyword_admin" is not in valid camel caps format
Open

            $keyword_admin = ' AND a.user_id = u.id ';

Consider putting global function "email_filter" in a static class
Open

function email_filter($email)

Variable "user_id" is not in valid camel caps format
Open

        $editProfileUrl = Display::getProfileEditionLink($user_id, true);

Variable "user_id" is not in valid camel caps format
Open

                    "dashboard_add_courses_to_user.php?user={$user_id}",

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    $number_of_selected_users = count($_POST['id']);

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    $number_of_affected_users = 0;

Variable "active_group" is not in valid camel caps format
Open

$active_group = [];

Consider putting global function "trimVariables" in a static class
Open

function trimVariables()

Variable "query_admin_table" is not in valid camel caps format
Open

            $query_admin_table = " , $admin_table a ";

Variable "user_id" is not in valid camel caps format
Open

            'user_id' => $user_id,

Variable "user_is_anonymous" is not in valid camel caps format
Open

        if (!$user_is_anonymous) {

Variable "user_id" is not in valid camel caps format
Open

                api_global_admin_can_edit_admin($user_id)

Variable "current_user_status_label" is not in valid camel caps format
Open

            if ($current_user_status_label == $statusname[DRH] ||

Variable "user_info" is not in valid camel caps format
Open

                    $user_info = api_get_user_info($user_id);

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    $number_of_selected_users = count($_POST['id']);

Variable "user_id" is not in valid camel caps format
Open

                            if ($user_id != $currentUserId) {

Variable "user_id" is not in valid camel caps format
Open

                                if (UserManager::enable($user_id)) {

Missing blank line before return statement
Open

    function() use ($showDeletedUsers) { return get_number_of_users($showDeletedUsers); },

Variable "number_of_items" is not in valid camel caps format
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array

Consider putting global function "user_filter" in a static class
Open

function user_filter($name, $params, $row)

Variable "is_admin" is not in valid camel caps format
Open

    $is_admin = in_array($user_id, $_admins_list);

Variable "current_user_status_label" is not in valid camel caps format
Open

    $current_user_status_label = $row['7'];

Variable "user_is_anonymous" is not in valid camel caps format
Open

        $user_is_anonymous = true;

Variable "user_id" is not in valid camel caps format
Open

            $result .= '<a href="user_information.php?user_id='.$user_id.'">'.

Variable "user_id" is not in valid camel caps format
Open

            api_global_admin_can_edit_admin($user_id, null, true)

Variable "_user" is not in valid camel caps format
Open

    $_user = api_get_user_info();

Variable "_user" is not in valid camel caps format
Open

    } elseif ($row['0'] != $_user['user_id']) {

Variable "user_id" is not in valid camel caps format
Open

                        foreach ($_POST['id'] as $index => $user_id) {

Variable "access_url_rel_user_table" is not in valid camel caps format
Open

        $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user

Variable "expiration_time" is not in valid camel caps format
Open

            if ($expiration_time < $t) {

Variable "user_id" is not in valid camel caps format
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string

Variable "user_id" is not in valid camel caps format
Open

function modify_filter($user_id, $url_params, $row): string

Variable "url_params" is not in valid camel caps format
Open

function modify_filter($user_id, $url_params, $row): string

Variable "user_id" is not in valid camel caps format
Open

                        'user_id' => $user_id,

Variable "user_id" is not in valid camel caps format
Open

                "dashboard_add_sessions_to_user.php?user={$user_id}"

Variable "user_id" is not in valid camel caps format
Open

                        foreach ($_POST['id'] as $index => $user_id) {

Variable "number_of_affected_users" is not in valid camel caps format
Open

                                    $number_of_affected_users++;

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    $number_of_affected_users = 0;

Variable "status_options" is not in valid camel caps format
Open

$status_options[PLATFORM_ADMIN] = get_lang('Administrator');

Variable "active_group" is not in valid camel caps format
Open

$form->addGroup($active_group, '', get_lang('activeAccount'), null, false);

Variable "keyword_admin" is not in valid camel caps format
Open

        $keyword_admin = '';

Variable "current_user_status_label" is not in valid camel caps format
Open

        in_array($current_user_status_label, $loginAsStatusForSessionAdmins);

Variable "is_admin" is not in valid camel caps format
Open

    if ($is_admin) {

Variable "number_of_selected_users" is not in valid camel caps format
Open

                    $number_of_selected_users = count($_POST['id']);

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Consider putting global function "prepare_user_sql_query" in a static class
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string

Variable "keyword_admin" is not in valid camel caps format
Open

        $sql .= " $keyword_admin $keyword_extra_value ";

Variable "user_id" is not in valid camel caps format
Open

    $editProfileUrl = Display::getProfileEditionLink($user_id, true);

Variable "user_id" is not in valid camel caps format
Open

            'user_id' => $user_id,

Expected 4 spaces after parameter name; 1 found
Open

 * @param   int $user_id The user id

Variable "user_id" is not in valid camel caps format
Open

    $is_admin = in_array($user_id, $_admins_list);

Variable "url_params" is not in valid camel caps format
Open

            $anonymizeUrl = "user_list.php?$url_params&"

Variable "user_id" is not in valid camel caps format
Open

                    "dashboard_add_sessions_to_user.php?user={$user_id}",

Variable "status_options" is not in valid camel caps format
Open

$status_options = [];

Variable "access_url_rel_user_table" is not in valid camel caps format
Open

        $access_url_rel_user_table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);

Variable "total_number_of_items" is not in valid camel caps format
Open

    return $obj->total_number_of_items;

Variable "url_params" is not in valid camel caps format
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string

Variable "url_params" is not in valid camel caps format
Open

    $restoreUrl = "user_list.php?$url_params&".

Variable "user_id" is not in valid camel caps format
Open

            if (api_global_admin_can_edit_admin($user_id, null, $sessionAdminCanLoginAs)) {

Variable "user_id" is not in valid camel caps format
Open

                $result .= '<a href="user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession().'">'.

Variable "user_id" is not in valid camel caps format
Open

                            if ($user_id != $currentUserId) {

Variable "status_options" is not in valid camel caps format
Open

$status_options['%'] = get_lang('All');

Variable "status_options" is not in valid camel caps format
Open

$status_options[COURSEMANAGER] = get_lang('Trainer');

Variable "user_table" is not in valid camel caps format
Open

    $user_table = Database::get_main_table(TABLE_MAIN_USER);

Consider putting global function "get_user_data" in a static class
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array

Variable "number_of_items" is not in valid camel caps format
Open

    $number_of_items = (int) $number_of_items;

Consider putting global function "modify_deleted_filter" in a static class
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string

Variable "_admins_list" is not in valid camel caps format
Open

    $is_admin = in_array($user_id, $_admins_list);

Variable "current_user_status_label" is not in valid camel caps format
Open

            if ($current_user_status_label == $statusname[DRH] || UserManager::is_admin($user_id)) {

Variable "tool_name" is not in valid camel caps format
Open

    $tool_name = get_lang('Search users');

Variable "number_of_affected_users" is not in valid camel caps format
Open

                    if ($number_of_selected_users == $number_of_affected_users) {

Variable "status_options" is not in valid camel caps format
Open

$status_options[STUDENT] = get_lang('Learner');

Closing brace must be on a line by itself
Open

    function() use ($showDeletedUsers) { return get_number_of_users($showDeletedUsers); },

Closing brace must be on a line by itself
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Variable "access_info" is not in valid camel caps format
Open

                    foreach ($access_info as $url_info) {

Missing blank line before return statement
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Variable "add_user" is not in valid camel caps format
Open

                if ($add_user) {

Variable "access_info" is not in valid camel caps format
Open

                if (!empty($access_info)) {

Variable "number_of_items" is not in valid camel caps format
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Variable "add_user" is not in valid camel caps format
Open

                $add_user = true;

Variable "table_result" is not in valid camel caps format
Open

$table_result = $table->return_table();

Variable "user_list" is not in valid camel caps format
Open

            foreach ($user_list as $user) {

Variable "extra_search_options" is not in valid camel caps format
Open

$tpl->assign('content', $form.$table_result.$extra_search_options);

Variable "user_list" is not in valid camel caps format
Open

        $user_list = UserManager::get_user_list(

Variable "access_info" is not in valid camel caps format
Open

                $access_info = UrlManager::get_access_url_from_user($user['id']);

Variable "access_info_to_string" is not in valid camel caps format
Open

                $access_info_to_string = '';

Variable "table_result" is not in valid camel caps format
Open

$tpl->assign('content', $form.$table_result.$extra_search_options);

Variable "row_table" is not in valid camel caps format
Open

                    $row_table = [];

Expected 1 space after FUNCTION keyword; 0 found
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Variable "extra_search_options" is not in valid camel caps format
Open

            $extra_search_options = Display::page_subheader(get_lang('Users found in other portals'));

Variable "row_table" is not in valid camel caps format
Open

                    $row_table[] = Display::url(

Variable "number_of_items" is not in valid camel caps format
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Variable "url_info" is not in valid camel caps format
Open

                        if ($urlId == $url_info['access_url_id']) {

Variable "row_table" is not in valid camel caps format
Open

                    $row_table[] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';

Variable "table_result" is not in valid camel caps format
Open

            $table_result = '';

Variable "user_list" is not in valid camel caps format
Open

        if (!empty($user_list)) {

Variable "url_info" is not in valid camel caps format
Open

                        $access_info_to_string .= $url_info['url'].'<br />';

Variable "access_info_to_string" is not in valid camel caps format
Open

                    $row_table[] = $access_info_to_string;

Variable "access_info_to_string" is not in valid camel caps format
Open

                        $access_info_to_string .= $url_info['url'].'<br />';

Variable "extra_search_options" is not in valid camel caps format
Open

            $extra_search_options .= $table->toHtml();

Variable "add_user" is not in valid camel caps format
Open

                            $add_user = false;

Variable "row_table" is not in valid camel caps format
Open

                    $row_table[] = $access_info_to_string;

Variable "row_table" is not in valid camel caps format
Open

                    foreach ($row_table as $cell) {

Variable "extra_search_options" is not in valid camel caps format
Open

$extra_search_options = '';

Variable "url_info" is not in valid camel caps format
Open

                    foreach ($access_info as $url_info) {

Variable "tool_name" is not in valid camel caps format
Open

$tpl = new Template($tool_name);

Opening brace must be the last content on the line
Open

    function() use ($showDeletedUsers) { return get_number_of_users($showDeletedUsers); },

Closing brace must be on a line by itself
Open

    function() use ($showDeletedUsers) { return get_number_of_users($showDeletedUsers); },

Opening brace must be the last content on the line
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

Closing brace must be on a line by itself
Open

    function($from, $number_of_items, $column, $direction) use ($showDeletedUsers) { return get_user_data($from, $number_of_items, $column, $direction, $showDeletedUsers); },

The variable $keyword_extra_value is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_admins_list is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $access_url_rel_user_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $is_admin is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $url_params is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $admin_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $keyword_admin is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $url_params is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $is_admin is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $url_params is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $query_admin_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $admin_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $keyword_admin is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $expiration_time is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_of_items is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $url_params is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $keyword_admin is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_of_items is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $query_admin_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $keyword_extra_value is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_of_items is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $expiration_time is not named in camelCase.
Open

function get_user_data(int $from, int $number_of_items, int $column, string $direction, bool $showDeletedUsers = false): array
{
    $sql = prepare_user_sql_query(false, $showDeletedUsers);
    if (!in_array($direction, ['ASC', 'DESC'])) {
        $direction = 'ASC';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_deleted_filter(int $user_id, string $url_params, array $row): string
{

    $result = '';
    $editProfileUrl = Display::getProfileEditionLink($user_id, true);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_admins_list is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $url_params is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $query_admin_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_user is not named in camelCase.
Open

function active_filter(int $active, string $params, array $row): string
{
    $_user = api_get_user_info();

    $action = 'Unlock';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $access_url_rel_user_table is not named in camelCase.
Open

function prepare_user_sql_query(bool $getCount, bool $showDeletedUsers = false): string
{
    $sql = '';
    $user_table = Database::get_main_table(TABLE_MAIN_USER);
    $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_is_anonymous is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_user is not named in camelCase.
Open

function active_filter(int $active, string $params, array $row): string
{
    $_user = api_get_user_info();

    $action = 'Unlock';
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $current_user_status_label is not named in camelCase.
Open

function modify_filter($user_id, $url_params, $row): string
{
    $_admins_list = Session::read('admin_list', []);
    $is_admin = in_array($user_id, $_admins_list);
    $statusname = api_get_status_langvars();
Severity: Minor
Found in public/main/admin/user_list.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status