Changeset 751

Show
Ignore:
Timestamp:
12/11/06 02:10:14 (2 years ago)
Author:
sven
Message:

fix username searching in user admin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/units/profile/function_init.php

    r588 r751  
    66 
    77        global $profile_id; 
     8        global $page_owner; 
    89         
    9         $profile_id = optional_param("profile_id",optional_param("profileid",$_SESSION['userid'],PARAM_INT),PARAM_INT); 
     10        if ($profile_name = optional_param('profile_name')) { 
     11            if ($profile_id = user_info_username('ident', $profile_name)) { 
     12                $page_owner = $profile_id; 
     13            } 
     14        } 
     15         
     16        if (empty($profile_id)) { 
     17            $profile_id = optional_param("profile_id",optional_param("profileid",$_SESSION['userid'],PARAM_INT),PARAM_INT); 
     18        } 
    1019 
    1120        /* 
     
    2433        */ 
    2534 
    26         global $page_owner; 
    2735         
    2836        if (!isset($page_owner) || optional_param("profile_id",-9000,PARAM_INT) != -9000) { 
  • devel/units/users/userdetails_edit.php

    r703 r751  
    189189        <input type="hidden" name="id" value="$page_owner" /> 
    190190        <input type="hidden" name="profile_id" value="$page_owner" /> 
     191END; 
     192        if (context == "admin") { 
     193            $body .= '<input type="hidden" name="context" value="admin" />'; 
     194        } 
     195        $body .= <<< END 
    191196        <input type="submit" value="$save" /> 
    192197    </p>