Changeset 861 in ExiteCMS for trunk/profile.php


Ignore:
Timestamp:
10/02/07 22:23:07 (5 years ago)
Author:
hverton
Message:

moved more templates to the template include directory
download panel had problems displaying an odd number of categories
make more modules xhtml compliant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/profile.php

    r843 r861  
    4141    // make sure we're only displaying one type of profile 
    4242    unset($group_id); 
    43     // find a member by the ID in the database 
    44     $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$lookup' LIMIT 1"); 
     43    if (isNum($lookup)) { 
     44        // find a member by the ID in the database 
     45        $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$lookup' LIMIT 1"); 
     46    } else { 
     47        // find a member by username in the database 
     48        $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='".stripinput($lookup)."' LIMIT 1"); 
     49    } 
    4550    if (dbrows($result)) { $data = dbarray($result); } 
    4651    $lookup = $data['user_id']; 
Note: See TracChangeset for help on using the changeset viewer.