Permalink
Browse files

Added hack for guest login with seeing login page

  • Loading branch information...
1 parent dad848c commit d00377f5843cb408865cb82e689815454d62adf3 moodler committed Sep 6, 2003
Showing with 9 additions and 1 deletion.
  1. +9 −1 login/index.php
View
@@ -19,8 +19,16 @@
}
}
+ $frm = false;
+ if (!empty($SESSION->wantsurl) and strstr($SESSION->wantsurl,"username=guest")) {
+ /// Log in as guest automatically (idea from Zbigniew Fiedorowicz)
+ $frm->username = "guest";
+ $frm->password = "guest";
+ } else {
+ $frm = data_submitted();
+ }
- if ($frm = data_submitted()) {
+ if ($frm) {
$frm->username = trim(moodle_strtolower($frm->username));
$user = authenticate_user_login($frm->username, $frm->password);
update_login_count();

0 comments on commit d00377f

Please sign in to comment.