예제 #1
0
파일: user.php 프로젝트: omtim/kleeja
 /**
  * Get the username by its ID
  * 
  * @param int $use_id The user ID
  * @return string Username
  */
 public function usernamebyid($user_id)
 {
     global $config;
     #if integrated, use its function
     if ($config['user_system'] != 1) {
         if (file_exists(PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php')) {
             include_once PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php';
             return kleeja_auth_username($user_id);
         }
     }
     #normal system
     $u = $this->get_data('name', $user_id);
     return $u['name'];
 }
예제 #2
0
 function usernamebyid($user_id)
 {
     global $config;
     //return user system to normal
     if (defined('DISABLE_INTR')) {
         $config['user_system'] = 1;
     }
     if ((int) $config['user_system'] != 1) {
         if (file_exists(PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php')) {
             include_once PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php';
             return kleeja_auth_username($user_id);
         }
     }
     //normal system
     $u = $this->get_data('name', $user_id);
     return $u['name'];
 }