以下のようなプログラム修正ではいかがでしょうか。
修正対象プログラム:
xauth.php
[ 修正前 ]
$user = authenticate_user_login($g_username, $g_password);
if (complete_user_login($user)) {
if(strpos($g_username,'shitei') !== false){
header('Location: ' . "http://root/course/view.php?id=591"); //ログイン後、指定コースへ遷移
exit;
}else{
header('Location: ' . "http://root/");
exit;
}
}
[ 修正後 ]
if ($user = authenticate_user_login($g_username, $g_password)) {
complete_user_login($user);
if (strpos($g_username,'shitei') !== false){
header('Location: ' . "http://root/course/view.php?id=591"); //ログイン後、指定コースへ遷移
exit;
} else {
header('Location: ' . "http://root/");
exit;
}
}
参考資料:
[php - Moodle login after signup - Stack Overflow]
https://stackoverflow.com/questions/30641889/moodle-login-after-signup