Project

General

Profile

« Previous | Next » 

Revision 2065

Added by Dietmar almost 11 years ago

  1. /admin/users bugfixes user deactivating and deleting

View differences:

index.php
33 33

  
34 34
	function admin_users_index($aActionRequest)
35 35
	{
36
		global $MESSAGE;
37 36
		$database = WbDatabase::getInstance();
37
		$mLang = Translate::getinstance();
38
		$mLang->enableAddon('admin\users');
38 39

  
39 40
        $sAdminPath = dirname(str_replace('\\', '/', __FILE__));
40 41
        $sAdminName = basename($sAdminPath);
......
91 92
// Check if user id is a valid number and doesnt equal 1
92 93
                $aActionRequest['user_id'] = $user_id;
93 94
    			if($user_id == 0){
94
        			msgQueue::add($MESSAGE['GENERIC_FORGOT_OPTIONS'] );
95
    				$admin = new admin('Access', 'users');
96
    				msgQueue::clear();
97
        			msgQueue::add($mLang->MESSAGE_GENERIC_FORGOT_OPTIONS );
98
                    $aActionRequest['user_id'] = $user_id;
99
                    $aActionRequest['cancel_url'] = ADMIN_URL.'/access/index.php';
100
					include($sAdminPath.'/user_list.php');
101
					$output  = show_userlist($admin, $aActionRequest);
102
    				break;
95 103
                }
96 104

  
97 105
    			if( ($user_id == $admin->get_user_id() ) )
......
105 113
    			if( ($user_id < 2 ) )
106 114
    			{
107 115
    				// if($admin_header) { $admin->print_header(); }
108
    				msgQueue::add($MESSAGE['GENERIC_SECURITY_ACCESS'] );
116
    				msgQueue::add($mLang->MESSAGE_GENERIC_SECURITY_ACCESS );
109 117
    			}
110 118
                $admin_header = false;
111 119
                if(isset($aActionRequest['BackLink'])) {
......
127 135
    			// Check if user id is a valid number and doesnt equal 1
128 136
                $aActionRequest['user_id'] = $user_id;
129 137
                $aActionRequest['cancel_url'] = ADMIN_URL.'/access/index.php';
130

  
131 138
				if($user_id > 1) // prevent 'admin' [ID 1] from modify
132 139
				{
133 140
					include($sAdminPath.'/user_form.php');

Also available in: Unified diff