TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
BackendUserSessionRepository.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Beuser\Domain\Repository
;
3
23
class
BackendUserSessionRepository
extends
\TYPO3\CMS\Extbase\Persistence\Repository
{
24
32
public
function
findByBackendUser
(\
TYPO3
\CMS\Beuser\Domain\Model\BackendUser $backendUser) {
33
$sessions = array();
34
$res =
$GLOBALS
[
'TYPO3_DB'
]->exec_SELECTquery(
35
'ses_id AS id, ses_iplock AS ip, ses_tstamp AS timestamp'
,
36
'be_sessions'
,
37
'ses_userid = '
. (
int
)$backendUser->getUid(),
38
''
,
39
'ses_tstamp ASC'
40
);
41
while
($row =
$GLOBALS
[
'TYPO3_DB'
]->sql_fetch_assoc($res)) {
42
$sessions[] = array(
43
'id'
=> $row[
'id'
],
44
'ip'
=> $row[
'ip'
],
45
'timestamp'
=> $row[
'timestamp'
]
46
);
47
}
48
$GLOBALS
[
'TYPO3_DB'
]->sql_free_result($res);
49
return
$sessions;
50
}
51
58
public
function
switchBackToOriginalUser
(\
TYPO3
\CMS\Core\Authentication\AbstractUserAuthentication $authentication) {
59
$updateData = array(
60
'ses_userid'
=> $authentication->user[
'ses_backuserid'
],
61
'ses_backuserid'
=> 0,
62
);
63
$GLOBALS
[
'TYPO3_DB'
]->exec_UPDATEquery(
64
'be_sessions'
,
65
'ses_id = '
.
$GLOBALS
[
'TYPO3_DB'
]->fullQuoteStr(
$GLOBALS
[
'BE_USER'
]->
id
,
'be_sessions'
) .
66
' AND ses_name = '
.
$GLOBALS
[
'TYPO3_DB'
]->fullQuoteStr(\
TYPO3
\CMS\Core\Authentication\BackendUserAuthentication::getCookieName(),
'be_sessions'
) .
67
' AND ses_userid='
. (
int
)
$GLOBALS
[
'BE_USER'
]->user[
'uid'
], $updateData
68
);
69
}
70
71
}
TYPO3
TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository\findByBackendUser
findByBackendUser(\TYPO3\CMS\Beuser\Domain\Model\BackendUser $backendUser)
Definition:
BackendUserSessionRepository.php:32
TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository
Definition:
BackendUserSessionRepository.php:23
TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository\switchBackToOriginalUser
switchBackToOriginalUser(\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication $authentication)
Definition:
BackendUserSessionRepository.php:58
TYPO3\CMS\Beuser\Domain\Repository
Definition:
BackendUserGroupRepository.php:2
$GLOBALS
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
Definition:
ext_localconf.php:5
TYPO3\CMS\Extbase\Persistence\Repository
Definition:
Repository.php:21
typo3
sysext
beuser
Classes
Domain
Repository
BackendUserSessionRepository.php
Generated on Wed Aug 7 2019 09:52:19 for TYPO3 CMS by
1.8.13