Changeset 1828

Show
Ignore:
Timestamp:
05/30/07 21:59:15 (2 years ago)
Author:
anarcat
Message:

add a function to find the home of a user that doesn't hardcode /var/alternc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/class/functions.php

    r1737 r1828  
    210210} 
    211211 
     212/** 
     213 * get the home of the user 
     214 * 
     215 * @args string $user the username, if null will use the global $mem. no 
     216 * security checks performed on path 
     217 * @returns string the actual absolute path 
     218 * @see $L_ALTERNC_LOC 
     219 */ 
     220function getuserpath($user = null) { 
     221  global $L_ALTERNC_LOC; 
     222  if (is_null($user)) { 
     223    global $mem; 
     224    $user = $mem->user['login']; 
     225  } 
     226  return $L_ALTERNC_LOC . "/html/".substr($user,0,1)."/".$user; 
     227} 
    212228 
    213229function cbox($test) {