XCL Web Application Platform
2.5.0
The XoopsCube Legacy Project
📘
Loading...
Searching...
No Matches
Legacy_Identity.class.php
1
<?php
10
11
if
(!defined(
'XOOPS_ROOT_PATH'
)) {
12
exit();
13
}
14
15
class
Legacy_Identity
extends
XCube_Identity
16
{
17
public
function
__construct(&$xoopsUser)
18
{
19
parent::__construct($xoopsUser);
20
21
if
(!is_object($xoopsUser)) {
22
die(
'Exception'
);
23
}
24
25
$this->mName = $xoopsUser->get(
'uname'
);
26
}
27
28
public
function
isAuthenticated
()
29
{
30
return
true
;
31
}
32
}
33
34
class
Legacy_AnonymousIdentity
extends
XCube_Identity
35
{
36
public
function
isAuthenticated
()
37
{
38
return
false
;
39
}
40
}
41
51
class
Legacy_GenericPrincipal
extends
XCube_Principal
52
{
57
public
function
addRole
($roleName)
58
{
59
if
(!$this->isInRole($roleName)) {
60
$this->_mRoles[] = $roleName;
61
}
62
}
63
64
public
function
isInRole($roleName)
65
{
66
return
in_array($roleName, $this->_mRoles);
67
}
68
}
Legacy_AnonymousIdentity
Definition
Legacy_Identity.class.php:35
Legacy_AnonymousIdentity\isAuthenticated
isAuthenticated()
Definition
Legacy_Identity.class.php:36
Legacy_GenericPrincipal
Definition
Legacy_Identity.class.php:52
Legacy_GenericPrincipal\addRole
addRole($roleName)
Definition
Legacy_Identity.class.php:57
Legacy_Identity
Definition
Legacy_Identity.class.php:16
Legacy_Identity\isAuthenticated
isAuthenticated()
Definition
Legacy_Identity.class.php:28
XCube_Identity
Definition
XCube_Identity.class.php:13
XCube_Principal
Definition
XCube_Identity.class.php:76
html
modules
legacy
kernel
Legacy_Identity.class.php
Generated by
1.13.2