Changeset 5592

Show
Ignore:
Timestamp:
01/14/08 12:45:14 (9 months ago)
Author:
p_lindheimer
Message:

#2626 logout user in devicesanduser mode not logging out if no default user set

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/core/agi-bin/user_login_out.agi

    r5269 r5592  
    115115                $default_user = get_default_user($this_device); 
    116116 
     117                debug("current_user: $current_user, default_user: $default_user",8); 
     118 
    117119                if ($current_user != $default_user) { 
    118120                        remove_user($this_device); 
     
    136138                $previous_devices = get_devices($user); 
    137139                $new_devices = insert_device($previous_devices,$device); 
    138                 debug("Setting user $user to devices $new_devices",5); 
     140                debug("insert_user: Setting user $user to devices $new_devices",5); 
    139141                set_user_devices($user, $new_devices); 
    140142                set_hint($user, $new_devices); 
     
    160162                        $current_devices = get_devices($current_user); 
    161163                        $new_devices = remove_device($current_devices,$device); 
    162                         debug("Setting user $current_user to devices $new_devices",5); 
     164                        debug("remove_user: Setting user $current_user to devices $new_devices",5); 
    163165                        set_user_devices($current_user, $new_devices); 
    164166                        set_hint($current_user, $new_devices); 
     
    167169                                debug("Got Return code: $ret trying to remove: {$astspooldir}/voicemail/device/$device",5); 
    168170                        } 
     171                        set_device_user($device, 'none'); 
    169172                } 
    170173        } 
     
    241244                $user = $agi->database_get('DEVICE',$device.'/user'); 
    242245                if ($user['result'] == 1 && trim($user['data']) != 'none') { 
     246                        debug("get_logged_in_user: got user: ".$user['data'],8); 
    243247                        return trim($user['data']); 
    244248                } 
     
    249253        // 
    250254        function get_default_user($device) { 
    251                 debug("get_defualt_user: device: $device",8); 
     255                debug("get_default_user: device: $device",8); 
    252256                global $agi; 
    253257 
     
    267271                $devices = $agi->database_get('AMPUSER',$user.'/device'); 
    268272                if ($devices['result'] == 1) { 
     273                        debug("get_devices: got: ".$devices['data'], 8); 
    269274                        return trim($devices['data']); 
    270275                } 
     
    293298                $user = $agi->database_get('DEVICE',$device.'/user'); 
    294299                if ($user['result'] == 1 && trim($user['data']) != 'none') { 
     300                        debug("get_user: got: ".$user['data'], 8); 
    295301                        return trim($user['data']); 
    296302                } 
     303                debug("get_user: no user found", 8); 
    297304                return ''; 
    298305        } 
     
    304311                global $agi; 
    305312                if (empty($devices)) { 
     313                        debug("No more devices associated with $user, deletting /device key", 8); 
    306314                        $agi->database_del('AMPUSER',$user.'/device'); 
    307315                } else { 
     316                        debug("set_user_devices: assigning $devices to $user /device key", 8); 
    308317                        $agi->database_put('AMPUSER',$user.'/device',$devices); 
    309318                } 
  • modules/branches/2.4/core/module.xml

    r5581 r5592  
    44        <category>Basic</category> 
    55        <name>Core</name> 
    6         <version>2.4.0beta2.2</version> 
     6        <version>2.4.0beta2.3</version> 
    77        <candisable>no</candisable> 
    88        <canuninstall>no</canuninstall> 
    99        <changelog> 
     10                *2.4.0beta2.3* #2626 logout user in devicesanduser mode not logging out if no default user set 
    1011                *2.4.0beta2.2* revert #2919, #2607, #2578, #2620, #2560, #2621, #2560, add RETURN option to macro-vm, added DUNDi trunk type 
    1112                *2.4.0beta2.1* #2576 fix macro-dial to hand dialparties returning with no numbers to dial 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads