diff --git a/main/auth/inscription.php b/main/auth/inscription.php index 9018e8c710..54b6e1c5fa 100755 --- a/main/auth/inscription.php +++ b/main/auth/inscription.php @@ -412,17 +412,20 @@ if ($form->validate()) { } } + $status = isset($values['status']) ? $values['status'] : null; + $phone = isset($values['phone']) ? $values['phone'] : null; + // Creates a new user $user_id = UserManager::create_user( $values['firstname'], $values['lastname'], - $values['status'], + $status, $values['email'], $values['username'], $values['pass1'], $values['official_code'], $values['language'], - $values['phone'], + $phone, null, PLATFORM_AUTH_SOURCE, null, @@ -593,7 +596,7 @@ if ($form->validate()) { $_user['mail'] = $values['email']; $_user['language'] = $values['language']; $_user['user_id'] = $user_id; - $is_allowedCreateCourse = $values['status'] == 1; + $is_allowedCreateCourse = isset($values['status']) && $values['status'] == 1; $usersCanCreateCourse = (api_get_setting('allow_users_to_create_courses') == 'true'); Session::write('_user', $_user); diff --git a/main/calendar/agenda_js.php b/main/calendar/agenda_js.php index 7e2a963757..f7be93357f 100755 --- a/main/calendar/agenda_js.php +++ b/main/calendar/agenda_js.php @@ -3,9 +3,7 @@ /** * @package chamilo.calendar */ -/** - * INIT SECTION - */ + use \ChamiloSession as Session; // name of the language file that needs to be included @@ -21,7 +19,6 @@ $userId = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null; if ($type == 'personal') { $cidReset = true; // fixes #5162 } - require_once '../inc/global.inc.php'; require_once 'agenda.lib.php'; require_once 'agenda.inc.php'; diff --git a/main/document/showinframes.php b/main/document/showinframes.php index c10067317c..065eecfd43 100755 --- a/main/document/showinframes.php +++ b/main/document/showinframes.php @@ -115,7 +115,7 @@ if (in_array(strtolower($pathinfo['extension']), $jplayer_supported_files)) { $group_id = api_get_group_id(); $current_group = GroupManager::get_group_properties($group_id); -$current_group_name=$current_group['name']; +$current_group_name = $current_group['name']; if (isset($group_id) && $group_id != '') { $req_gid = '&gidReq='.$group_id;