Skip to content
Luavis edited this page Jul 31, 2013 · 7 revisions

##Description

/lib/classes/User.class.php에 정의 되어있습니다. 유저에 대한 기본 정보를 가지고 있으며 Singleton class입니다.

##Attributes

readonly $id

PRIMARY index 값

readonly $inputId

일반적인 사용자 ID (로그인/회원가입시 입력하는 아이디)

readonly $userId

$inputId 와 같음

readonly $nickName

닉네임

readonly $userName

실명 (실제 이름)

readonly $emailAddress

이메일 주소

readonly $phoneNumber

휴대폰 주소

readonly $lastLoginedIp

최근 로그인 IP

readonly $extraVars

추가 변수

readonly $groups

유저가 속한 그룹 (Array)

  • groupId : 그룹의 고유 id
  • name : 그룹 이름
  • nameLocale : 현재 언어판 그룹 이름
  • nameLocales : 언어별 그룹이름

##Methods

public __construct($data)

#####Description $data에는 유저정보가 담긴 Object 입력

#####Note 호출 하지 마시오

static public getCurrent()

#####Description 현재 로그인되어있는 유저 반환

#####Note 로그인 되어있지 않을시 NULL 반환

static public initCurrent()

현재 로그인되어있는 유저 초기화

#####Note

  • Context 클래스에서 자동으로 실행함
  • 호출하지 마시오.

public checkGroup($groups)

######Description 현재 유저가 요청된 그룹에 속해있는지를 반환

#####Note

  • @param $groups : Array 혹은 String 타입 입력 가능
  • Array 타입 입력시 여러 그룹중 하나라도 속해있으면 true 반환
  • String 타입 입력시 유저가 해당 그룹에 속해있으면 true 반환

Clone this wiki locally