chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

$userInfo = api_get_user_info($user_id);

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

api_protect_super_admin($user_id, null, true);

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

var is_platform_id = "'.$is_platform_admin.'";

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

$user_data['platform_admin'] = is_null($user_data['is_admin']) ? 0 : 1;

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

        LEFT JOIN $table_admin a ON a.user_id = u.id

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

$user_id = isset($_GET['user_id']) ? (int) $_GET['user_id'] : (int) $_POST['user_id'];

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

$user_data = Database::fetch_assoc($res);

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

        WHERE u.id = '".$user_id."'";

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

$user_data['platform_admin'] = is_null($user_data['is_admin']) ? 0 : 1;

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

$sql = "SELECT u.*, a.user_id AS is_admin FROM $table_user u

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

$table_user = Database::get_main_table(TABLE_MAIN_USER);

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

$user_data['old_password'] = $user_data['password'];

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

$this_section = SECTION_PLATFORM_ADMIN;

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

$is_platform_admin = api_is_platform_admin() ? 1 : 0;

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

$userObj = api_get_user_entity($user_id);

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

$table_admin = Database::get_main_table(TABLE_MAIN_ADMIN);

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

$user_data['send_mail'] = 0;

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

$tool_name = get_lang('Edit user information');

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

$user_data['registration_date'] = api_get_local_time($user_data['registration_date']);

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

$user_data['registration_date'] = api_get_local_time($user_data['registration_date']);

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

        $picture_uri = $user_data['picture_uri'];

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

        $official_code = $user['official_code'];

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

$studentBossList = UserManager::getStudentBossList($user_id);

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

$error_drh = false;

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

    if (2 == $reset_password && empty($user['password'])) {

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

        $error_drh = true;

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

            $picture_uri = UserManager::deleteUserPicture($user_id);

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

            $send_mail,

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

$bigImage = UserManager::getUserPicture($user_id, USER_IMAGE_SIZE_ORIGINAL);

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

$creatorInfo = api_get_user_info($user_data['creator_id']);

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

    $form->addElement('hidden', 'active', $user_data['active']);

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

    $expiration_date = $user_data['expiration_date'];

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

    $expiration_date = $user_data['expiration_date'];

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

        $send_mail = (int) $user['send_mail'];

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

    $allowed_picture_types

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

    $form->addRule('username', get_lang('This login is already in use'), 'username_available', $user_data['username']);

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

            $auth_sources[$key] = $key;

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

$display = isset($user_data['status']) && (STUDENT == $user_data['status'] || (isset($_POST['status']) && STUDENT == $_POST['status'])) ? 'block' : 'none';

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

    $form->addElement('hidden', 'expiration_date', $user_data['expiration_date']);

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

        header('Location: '.api_get_self().'?user_id='.$user_id);

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

            $picture_uri = UserManager::deleteUserPicture($user_id);

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

            $picture_uri = UserManager::deleteUserPicture($user_id);

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

            $user_id,

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

            $official_code,

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

        'admin/user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession()

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

unset($user_data['password']);

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

        $user_data['expiration_date'] = api_get_local_time($expiration_date);

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

        $platform_admin = (int) $user['platform_admin'];

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

if ($error_drh) {

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

$allowed_picture_types = api_get_supported_image_extensions(false);

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

$display = isset($user_data['status']) && (STUDENT == $user_data['status'] || (isset($_POST['status']) && STUDENT == $_POST['status'])) ? 'block' : 'none';

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

$isUserEditingOwnAccount = ($user_data['id'] === api_get_user_id());

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

$form->setDefaults($user_data);

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

        $picture_element = $form->getElement('picture');

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

            $picture_uri = UserManager::deleteUserPicture($user_id);

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

        if (1 == $platform_admin) {

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

        $group[] = $form->createElement('select', 'auth_source', null, $auth_sources);

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

$user_data['reset_password'] = 0;

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

        $user_data['expiration_date'] = api_get_local_time();

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

        $user_data['expiration_date'] = api_get_local_time($expiration_date);

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

        $expiration_date = !empty($user['expiration_date']) ? $user['expiration_date'] : null;

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

            $hr_dept_id,

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

            $reset_password,

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

$hideFields = $isUserEditingOwnAccount || USER_SOFT_DELETED == $user_data['active'];

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

    if (DRH == $user['status'] && $is_user_subscribed_in_course) {

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

        $picture = $picture_element->getValue();

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

            $picture_uri,

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

            $expiration_date,

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

        api_get_path(WEB_CODE_PATH).'admin/user_information.php?user_id='.$user_id

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

    api_get_self().'?user_id='.$user_id,

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

                $user_id,

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

            api_get_path(WEB_CODE_PATH).'admin/user_edit.php?user_id='.$user_id

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

$user_data['old_password'] = $user_data['password'];

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

            $user_id,

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

        if ($user_id != $currentUserId) {

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

$form->addElement('header', $tool_name);

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

    $form->addRule('email', get_lang('This login is already in use'), 'username_available', $user_data['username']);

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

    1 == $user_data['status'] ? $display = 'block' : $display = 'none';

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

    $is_user_subscribed_in_course = CourseManager::is_user_subscribed_in_course($user['user_id']);

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

            $picture_uri = UserManager::update_user_picture(

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

            if (1 == $platform_admin) {

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

        $userInfo = api_get_user_info($user_id);

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

$form->addElement('hidden', 'user_id', $user_id);

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

        'user_information.php?user_id='.$user_data['creator_id'],

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

        $user_data['registration_date']

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

$user_data['student_boss'] = $studentBossList;

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

    $reset_password = (int) $user['reset_password'];

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

        $reset_password = (int) $user['reset_password'];

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

$nb_ext_auth_source_added = 0;

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

    $user_id,

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

    if (empty($expiration_date)) {

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

$normalImage = UserManager::getUserPicture($user_id, USER_IMAGE_SIZE_BIG);

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

    $auth_sources = [];

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

    if ($nb_ext_auth_source_added > 0) {

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

        $auth_source = $user['auth_source'] ?? $userInfo['auth_source'];

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

        $hr_dept_id = isset($user['hr_dept_id']) ? intval($user['hr_dept_id']) : null;

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

$tpl = new Template($tool_name);

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

    get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(',', $allowed_picture_types).')',

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

            $nb_ext_auth_source_added++;

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

        $user_data['radio_expiration_date'] = 0;

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

        $user_data['radio_expiration_date'] = 1;

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

        $picture_uri = $user_data['picture_uri'];

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

            $expiration_date = null;

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

            $auth_source,

There are no issues that match your filters.

Category
Status