Browse Source

Now basic working version

Brendan Abolivier 8 years ago
parent
commit
3688a195b5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      auth.php

+ 2
- 2
auth.php View File

64
 	}
64
 	}
65
 
65
 
66
 	function loginpage_hook() {
66
 	function loginpage_hook() {
67
-		global $DB, $login;
67
+		global $DB, $login, $CFG;
68
 		$message = "";
68
 		$message = "";
69
 		if(!empty($_COOKIE['das-macaroon'])) {
69
 		if(!empty($_COOKIE['das-macaroon'])) {
70
 			try {
70
 			try {
85
 						$user->firstname = $name[0];
85
 						$user->firstname = $name[0];
86
 						$user->lastname = $name[1];
86
 						$user->lastname = $name[1];
87
 						$user->email = $login."@brendanabolivier.com";
87
 						$user->email = $login."@brendanabolivier.com";
88
-						//	var_dump($user);
89
 						$DB->update_record('user', $user);
88
 						$DB->update_record('user', $user);
90
 						complete_user_login($user);
89
 						complete_user_login($user);
90
+						redirect($CFG->wwwroot);
91
 					}
91
 					}
92
 				}
92
 				}
93
 			} catch(Exception $e) {
93
 			} catch(Exception $e) {