Minor - Small changes recommended by Scrutinizer

1.10.x
Yannick Warnier 9 years ago
parent 3f2a42b12b
commit 07da6d21d1
  1. 2
      custompages/first_login-dist.php
  2. 5
      main/admin/user_move_stats.php
  3. 3
      main/auth/cas/lib/CAS/PGTStorage/pgt-db.php
  4. 1
      main/auth/shibboleth/test/shibboleth_test.class.php
  5. 2
      main/inc/lib/usermanager.lib.php

@ -48,7 +48,7 @@ if (isset($_POST['password'])) {
''
);
if ($updated) {
if ($updated !== false) {
UserManager::update_extra_field_value($u['user_id'], 'already_logged_in', 'true');
ConditionalLogin::login();
}

@ -200,9 +200,10 @@ if (isset($_REQUEST['load_ajax'])) {
foreach ($list as $id => $data) {
if ($update_database) {
$sql = "UPDATE $TBL_TRACK_E_COURSE_ACCESS SET session_id = $new_session_id WHERE course_access_id = $id";
if ($debug) echo $sql;
if ($debug) {
echo $sql;
}
$res = Database::query($sql);
if ($debug) var_dump($res);
$result_message[$TBL_TRACK_E_COURSE_ACCESS]++;
}
}

@ -206,8 +206,9 @@ class PGTStorageDB extends PGTStorage
// try to connect to the database
$this->_link = DB::connect($this->getURL());
if ( DB::isError($this->_link) ) {
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
}
// Dump into trace
var_dump($this->_link);
phpCAS::traceBEnd();
}

@ -204,6 +204,7 @@ class ShibbolethTest
{
$message = "Assert failed $message <br/>";
echo $message;
// Dump variable for debug
var_dump(debug_backtrace());
die;
}

@ -800,7 +800,7 @@ class UserManager
* @param int The user ID of the person who registered this user (optional, defaults to null)
* @param int The department of HR in which the user is registered (optional, defaults to 0)
* @param array A series of additional fields to add to this user as extra fields (optional, defaults to null)
* @return boolean true if the user information was updated
* @return boolean|integer False on error, or the user ID if the user information was updated
* @assert (false, false, false, false, false, false, false, false, false, false, false, false, false) === false
*/
public static function update_user(

Loading…
Cancel
Save