Basic authentication via X.org.
[dotclear.git] / class.xorg.auth.php
1 <?php
2
3 require_once dirname(__FILE__) . '/../../inc/core/class.dc.auth.php';
4
5 class xorgAuth extends dcAuth {
6 public $xorg_infos = array('forlife' => null,
7 'prenom' => null,
8 'nom' => null);
9
10 public function __construct() {
11 @session_start();
12 if (@$_SESSION['auth-xorg']) {
13 foreach ($this->xorg_infos as $key => $val) {
14 $this->xorg_infos[$key] = $_SESSION['auth-xorg-' . $key];
15 }
16 }
17 }
18
19 public function checkUser($user_id, $pwd = null, $user_key = null) {
20 // echo "checking auth for " . $user_id;
21 return parent::checkUser($user_id, $pwd, $user_key);
22 }
23
24 public function check($permissions, $blog_id) {
25 // echo "Checking right to view $permissions on $blog_id";
26 return parent::check($permissions, $blog_id);
27 }
28 }
29
30 ?>