-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
helper.php
35 lines (34 loc) · 823 Bytes
/
helper.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
<?php
function TT_check_return_user_type($user_row, $checkBan = false)
{
global $db, $user, $config, $auth;
//$session = new user();
$user_id = $user_row['user_id'];
if($checkBan)
{
$is_ban = $user->check_ban($user_id,false,false,true);
if(!empty($is_ban) && $is_ban)
{
return 'banned';
}
}
$auth2 = new \phpbb\auth\auth();
$auth2->acl($user_row);
if ($auth2->acl_gets('a_'))
{
return 'admin';
}
else if($auth2->acl_gets('m_'))
{
return 'mod';
}
else if($user_row['user_type'] == USER_INACTIVE && $config['require_activation'] == USER_ACTIVATION_ADMIN)
{
return 'unapproved';
}
else if($user_row['user_type'] == USER_INACTIVE)
{
return'inactive';
}
return 'normal';
}