Changeset 1015

Show
Ignore:
Timestamp:
03/07/07 18:21:53 (2 years ago)
Author:
ben
Message:

Some bugfixes for user deletion.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/userlib.php

    r1011 r1015  
    317317 
    318318         // Verify that the user exists 
    319          if ($user = get_record_sql("select * from {$CFG->prefix}users where ident = {$user_id}")))
     319         if ($user = get_record_sql("select * from {$CFG->prefix}users where ident = {$user_id}"))
    320320              
    321321             // Call the event hook for all plugins to do their worst with the user's data 
  • devel/mod/file/lib.php

    r1012 r1015  
    279279                } 
    280280            } 
    281             @unlink($CFG->dataroot."files/".substr($object->username,0,1)."/".$object->username
     281            @unlink($CFG->dataroot."files/".substr($object->username,0,1)."/".$object->username)
    282282            if ($folders = get_records_sql("select * from {$CFG->prefix}file_folders where owner = {$object->ident} or files_owner = {$object->ident}")) { 
    283283                foreach($folders as $folder) { 
  • devel/mod/friend/lib.php

    r1003 r1015  
    7878            delete_records('friends','friend',$object->ident); 
    7979        } 
     80        return $object; 
    8081    } 
    8182 
  • devel/units/users/userdetails_actions.php

    r1013 r1015  
    2424                $messages[] = __gettext("Error: the user could not be deleted."); 
    2525            } 
     26            $_SESSION['messages'] = $messages; 
    2627            if ($_SESSION['userid'] == $page_owner) { 
    27                 $_SESSION['messages'] = $messages; 
    2828                header("Location: {$CFG->wwwroot}login/logout.php"); 
     29                exit; 
     30            } else { 
     31                header("Location: {$CFG->wwwroot}devel/_userdetails/"); 
    2932                exit; 
    3033            }