diff --git a/main/admin/ldap_synchro.php b/main/admin/ldap_synchro.php index 5e0ebe1eb4..455cba251d 100755 --- a/main/admin/ldap_synchro.php +++ b/main/admin/ldap_synchro.php @@ -103,12 +103,40 @@ foreach ($Sessions as $session) { $active = 1; // Ajout de l'utilisateur if (UserManager::is_username_available($username)) { - $user_id = UserManager::create_user($firstname, $lastname, $status, $email, $username, $password, $official_code, api_get_setting('platformLanguage'), $phone, $picture_uri, $auth_source, $expiration_date, $active); + $user_id = UserManager::create_user( + $firstname, + $lastname, + $status, + $email, + $username, + $password, + $official_code, + api_get_setting('platformLanguage'), + $phone, + $picture_uri, + $auth_source, + $expiration_date, + $active + ); $UserAdd[] = $user_id; } else { $user = api_get_user_info_from_username($username); $user_id = $user['user_id']; - UserManager::update_user($user_id, $firstname, $lastname, $username, null, null, $email, $status, $official_code, $phone, $picture_uri, $expiration_date, $active); + UserManager::update_user( + $user_id, + $firstname, + $lastname, + $username, + null, + null, + $email, + $status, + $official_code, + $phone, + $picture_uri, + $expiration_date, + $active + ); $UserUpdate[] = $user_id; } $UserList[] = $user_id; diff --git a/main/auth/cas/authcas.php b/main/auth/cas/authcas.php index 1b476d5774..6a50c80165 100755 --- a/main/auth/cas/authcas.php +++ b/main/auth/cas/authcas.php @@ -106,8 +106,19 @@ function cas_is_authenticated() case PLATFORM_AUTH_SOURCE : // user will have to modify firstname, lastname, email in chamilo profil edit $userdata = get_lang("EditInProfil"); - UserManager::create_user($userdata, $userdata, '5', $userdata, $login, 'casplaceholder', '', '', - '', '', CAS_AUTH_SOURCE); + UserManager::create_user( + $userdata, + $userdata, + '5', + $userdata, + $login, + 'casplaceholder', + '', + '', + '', + '', + CAS_AUTH_SOURCE + ); $user_added = $login; break; case LDAP_AUTH_SOURCE : diff --git a/main/auth/ldap/authldap.php b/main/auth/ldap/authldap.php index 412011acc6..530ccba0fa 100755 --- a/main/auth/ldap/authldap.php +++ b/main/auth/ldap/authldap.php @@ -206,9 +206,19 @@ function ldap_put_user_info_locally($login, $info_array) { $language = api_get_setting('platformLanguage'); if (empty($language)) { $language = 'english'; } - $_userId = UserManager::create_user($prenom, $nom, $status, - $email, $uname, $password, $official_code, - $language, '', '', 'ldap'); + $_userId = UserManager::create_user( + $prenom, + $nom, + $status, + $email, + $uname, + $password, + $official_code, + $language, + '', + '', + 'ldap' + ); //echo "new user added to Chamilo, id = $_userId"; @@ -516,12 +526,40 @@ function ldap_add_user_by_array($data, $update_if_exists = true) { // Adding user $user_id = 0; if (UserManager::is_username_available($username)) { - $user_id = UserManager::create_user($firstname, $lastname, $status, $email, $username, $password, $official_code, api_get_setting('platformLanguage'), $phone, $picture_uri, $auth_source, $expiration_date, $active); + $user_id = UserManager::create_user( + $firstname, + $lastname, + $status, + $email, + $username, + $password, + $official_code, + api_get_setting('platformLanguage'), + $phone, + $picture_uri, + $auth_source, + $expiration_date, + $active + ); } else { if ($update_if_exists) { $user = api_get_user_info($username); $user_id = $user['user_id']; - UserManager::update_user($user_id, $firstname, $lastname, $username, null, null, $email, $status, $official_code, $phone, $picture_uri, $expiration_date, $active); + UserManager::update_user( + $user_id, + $firstname, + $lastname, + $username, + null, + null, + $email, + $status, + $official_code, + $phone, + $picture_uri, + $expiration_date, + $active + ); } } return $user_id;