3 require_once dirname(dirname(__FILE__
)) . '/config.php';
6 $username = required_param('u', PARAM_ALPHANUM
);
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);
13 $mnetidprovider = get_string('mnetidprovider','mnet');
14 $navigation = build_navigation(array(array('name' => $mnetidprovider, 'link' => null, 'type' => 'misc')));
16 print_header($mnetidprovider, $mnetidprovider, $navigation, 'form.email' );
17 notify(get_string('mnetidproviderdesc', 'mnet'));
19 if ($form = data_submitted() and confirm_sesskey()) {
20 if ($user = get_record_select('user', "username = '$username' AND email = '$form->email' AND mnethostid != $CFG->mnet_localhost_id")) {
21 if (!empty($user->mnethostid
) and $host = get_record('mnet_host', 'id', $user->mnethostid
)) {
22 $link = "<a href=\"{$host->wwwroot}/login/\">{$host->name}</a>";
23 notice(get_string('mnetidprovidermsg','mnet',$link));
27 notice(get_string('mnetidprovidernotfound', 'mnet'));
32 print_simple_box_start('center','50%','','20');
36 <input type
="hidden" name
="sesskey" value
="<?php echo $sesskey; ?>">
37 <?php
echo get_string('email') ?
>:
38 <input type
="text" name
="email" size
="" maxlength
="100" />
39 <input type
="submit" value
="<?php echo get_string('findlogin','mnet'); ?>" />
43 print_simple_box_end();