ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilAuthContainerCalendarToken.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once 'Auth/Container.php';
5 
16 {
17  protected $current_user_id = 0;
18 
23  public function __construct()
24  {
26  }
27 
28  function fetchData($username,$password)
29  {
30  $GLOBALS['ilLog']->write('Fetch data');
31  include_once './Services/Calendar/classes/class.ilCalendarAuthenticationToken.php';
32  $this->current_user_id = ilCalendarAuthenticationToken::lookupUser($_GET['token']);
33 
34  return $this->current_user_id > 0;
35  }
36 
42  public function loginObserver($a_username,$a_auth)
43  {
44  $GLOBALS['ilLog']->write('Called login observer');
45 
46  $name = ilObjUser::_lookupName($this->current_user_id);
47  $a_auth->setAuth($name['login']);
48  return true;
49  }
50 }