XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
deactivate.php
Go to the documentation of this file.
1 <?php
2 include 'admin_header.php';
4 
5 if ( !isset($_REQUEST['uid']) ) {
7 }
9 $user = $member_handler->getUser($_REQUEST['uid']);
10 if ( !$user || $user->isNew() ) {
12 }
13 
14 if ( in_array(XOOPS_GROUP_ADMIN, $user->getGroups() ) ) {
15  redirect_header("index.php", 2, _PROFILE_AM_CANNOTDEACTIVATEWEBMASTERS);
16 }
17 $user->setVar('level', $_REQUEST['level']);
18 if ( $member_handler->insertUser($user) ) {
19  if ( $_REQUEST['level'] == 1 ) {
20  $message = _PROFILE_AM_USER_ACTIVATED;
21  } else {
23  }
24 } else {
25  if ( $_REQUEST['level'] == 1 ) {
27  } else {
29  }
30 }
31 redirect_header("../userinfo.php?uid=" . $user->getVar('uid'), 3, $message);
32 ?>