MDL-9506 Refactored grade_tree::get_tree by doing the following:
[moodle-pu.git] / login / mnet_email.php
blob0d3e69b10ea05bf5e5a5e5f33ec24cdf31bee65a
1 <?php
3 require_once dirname(dirname(__FILE__)) . '/config.php';
4 httpsrequired();
6 $username = required_param('u', PARAM_ALPHANUM);
7 $sesskey = sesskey();
9 // if you are logged in then you shouldn't be here
10 if (isloggedin() and !isguestuser()) {
11 redirect( $CFG->wwwroot.'/', get_string('loginalready'), 5);
14 print_header('MNET ID Provider', 'MNET ID Provider', 'MNET ID Provider', 'form.email' );
16 if ($form = data_submitted() and confirm_sesskey()) {
17 if ($user = get_record('user', 'username', $username, 'email', $form->email)) {
18 if (!empty($user->mnethostid) and $host = get_record('mnet_host', 'id', $user->mnethostid)) {
19 notice("You should be able to login at your <a href=\"{$host->wwwroot}/login/\">{$host->name}</a> provider.");
24 echo '<p>&nbsp;</p>';
25 print_simple_box_start('center','50%','','20');
28 <form method="post">
29 <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
30 <?php echo get_string('email') ?>:
31 <input type="text" name="email" size="" maxlength="100" />
32 <input type="submit" value="Find Login" />
33 </form>
34 <?php
36 print_simple_box_end();
37 print_footer();