-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdminLog.script.php
43 lines (38 loc) · 1.08 KB
/
AdminLog.script.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Scripts;
class AdminLog extends \Classes\Scripting\UserScript {
function OnLogin(\Classes\User $user) {
\Classes\Singleton::getInstance('\Classes\MySQL')
->tableAction('admin_log')
->insert(
[
'uid' => $user->getId(),
'action' => 'User angemeldet',
'data' => 'Verschiedene Daten'
]
);
}
function OnLogout(\Classes\User $user) {
\Classes\Singleton::getInstance('\Classes\MySQL')
->tableAction('admin_log')
->insert(
[
'uid' => $user->getId(),
'action' => 'User abgemeldet',
'data' => 'Verschiedene Daten'
]
);
}
function OnRegister(\Classes\User $user, &$status) {
\Classes\Singleton::getInstance('\Classes\MySQL')
->tableAction('admin_log')
->insert(
[
'uid' => $user->getId(),
'action' => 'User registriert',
'data' => 'Status: '.$status
]
);
}
}
?>