Logo Search packages:      
Sourcecode: aegir-provision version File versions  Download package

provision_posix_username ( user  ) 

Return the valid system username for $user.

Returns:
Returns the username if found, otherwise returns FALSE

Definition at line 230 of file provision.inc.

Referenced by provision_user_in_group().

                                         {
  // TODO: make these singletons with static variables for caching.
  // we do this both ways, so that the function returns NULL if no such user was found.
  if (is_numeric($user)) {
    $info = posix_getpwuid($user);
    $user = $info['name'];
  }
  else {
    $info = posix_getpwnam($user);
    $user = $info['name'];
  }
  return $user;
}


Generated by  Doxygen 1.6.0   Back to index