cvs: pear /Perm_LiveUser/examples/example4 main.inc.php

From: Date: Sun, 23 Mar 2003 22:06:05 +0000
Subject: cvs: pear /Perm_LiveUser/examples/example4 main.inc.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-9600@lists.php.net to get a copy of this message
krausbn Sun Mar 23 17:06:05 2003 EDT Modified files: /pear/Perm_LiveUser/examples/example4 main.inc.php Log: * Loginfunction now uses status. Index: pear/Perm_LiveUser/examples/example4/main.inc.php diff -u pear/Perm_LiveUser/examples/example4/main.inc.php:1.2 pear/Perm_LiveUser/examples/example4/main.inc.php:1.3 --- pear/Perm_LiveUser/examples/example4/main.inc.php:1.2 Sat Mar 22 05:55:23 2003 +++ pear/Perm_LiveUser/examples/example4/main.inc.php Sun Mar 23 17:06:05 2003 @@ -46,14 +46,19 @@ if ($error) { if (isset($liveUserObj)) { if (is_object($liveUserObj)) { - if ($liveUserObj->isInactive()) { - $tpl->touchBlock('inactive'); - } elseif ($liveUserObj->expired) { - $tpl->touchBlock('expired'); - } elseif ($liveUserObj->idled) { - $tpl->touchBlock('idled'); - } else { - $tpl->touchBlock('failure'); + switch ($liveUserObj->status) { + case LIVEUSER_AUTH_ISINACTIVE: + $tpl->touchBlock('inactive'); + break; + case LIVEUSER_AUTH_IDLED: + $tpl->touchBlock('idled'); + break; + case LIVEUSER_AUTH_EXPIRED: + $tpl->touchBlock('expired'); + break; + default: + $tpl->touchBlock('failure'); + break; } } } else { @@ -116,7 +121,7 @@ $LoMa->init(); - if (!$LoMa->isLoggedIn()) { + if ($LoMa->getStatus()) { showLoginForm($LoMa, 1); } ?>

« previous php.pear.cvs (#9600) next »