Changeset 313

Show
Ignore:
Timestamp:
05/08/06 08:41:31 (3 years ago)
Author:
carmartin
Message:

profile/edit: dig up the user id from the session if needed

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>

Files:

Legend:

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

    r302 r313  
    1313} 
    1414if (empty($profile_id)) { 
     15    // fetch from GET/POST param 
    1516    $profile_id = optional_param('profile_id', -1, PARAM_INT); 
     17 
     18    // if it wasn't in GET/POST but we have a valid session, use it 
     19    if ($profile_id === -1 && isset($_SESSION['userid'])) { 
     20        $profile_id = $_SESSION['userid']; 
     21    } 
     22 
    1623    $profile_name = run("users:id_to_name", $profile_id); 
    1724}