.

PermanentLogins Class Reference
[Usermanagement]

Helper functions around permant logins. More...

List of all members.

Static Public Member Functions

static  enable_permanent_login ($user)
  Enable permanent login for given user.
static  end_permanent_login ()
  Ends permanent login for current user.
static  get_current ()
  Returns current, if any.

Public Attributes

const  COOKIE_NAME = 'C128'

Detailed Description

Helper functions around permant logins.

Author:
Gerd Riesselmann

Definition at line 8 of file permanentlogins.facade.php.


Member Function Documentation

static PermanentLogins::enable_permanent_login ( user  )  [static]

Enable permanent login for given user.

Definition at line 31 of file permanentlogins.facade.php.

00031                                                              {
00032                 $cmd = CommandsFactory::create_command('permanentlogins', 'create', $user);
00033                 $cmd->execute();
00034         }
static PermanentLogins::end_permanent_login (  )  [static]

Ends permanent login for current user.

Definition at line 39 of file permanentlogins.facade.php.

00039                                                      {
00040                 $cmd = CommandsFactory::create_command('permanentlogins', 'end', false);
00041                 $cmd->execute();                
00042         }
static PermanentLogins::get_current (  )  [static]

Returns current, if any.

Returns:
DAOPermanentlogins

Definition at line 16 of file permanentlogins.facade.php.

00016                                              {
00017                 $ret = false;
00018                 $code = Cookie::get_cookie_value(self::COOKIE_NAME);
00019                 if ($code) {
00020                         $tmp = DB::get_item('permanentlogins', 'code', $code);
00021                         if ($tmp && $tmp->expirationdate > time()) {
00022                                 $ret = $tmp;
00023                         }
00024                 }
00025                 return $ret; 
00026         }

Member Data Documentation

Definition at line 9 of file permanentlogins.facade.php.


The documentation for this class was generated from the following file: