PHP 클래스 Users_model, 68kb

상속: extends CI_Model
파일 보기 프로젝트 열기: 68kb/68kb 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) : void Constructor
add_user ( $data ) : mixed Add User
delete_user ( $user_id ) : boolean Delete User
edit_user ( $user_id, $data ) : boolean Edit User
email_check ( $email, $id = '' ) : boolean Checks if an email is already in use.
generate_api_key ( $length = 32 ) : string generate_api_key function.
get_user ( $query ) : array Get user
hash_pass ( $password ) : string Hash the password
reset_password ( $hash ) : boolean Resets a users password. Used by forgot password routine.
send_new_password ( $user_id ) ------------------------------------------------------------------------
update_api_key ( $user_api_key, $user_id ) : boolean Update the API key in the user table
update_login_info ( $user_id ) : void Update user login info, such as IP-address or login time.
user_notes ( $user_id ) : array User Notes
username_check ( $username, $id = '' ) : boolean Checks if a username is already in use.
users_listings ( $listing_owner_id ) : string Finds users active listings

비공개 메소드들

메소드 설명
_get_user_by_id ( $user_id ) : mixed Get User By id
_get_user_by_username ( $user_name ) : mixed Get User By id

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( ) : void
리턴 void

add_user() 공개 메소드

Add User
public add_user ( $data ) : mixed
리턴 mixed

delete_user() 공개 메소드

Delete User
public delete_user ( $user_id ) : boolean
리턴 boolean

edit_user() 공개 메소드

Edit User
public edit_user ( $user_id, $data ) : boolean
리턴 boolean

email_check() 공개 메소드

Checks if an email is already in use.
public email_check ( $email, $id = '' ) : boolean
리턴 boolean

generate_api_key() 공개 메소드

generate_api_key function.
public generate_api_key ( $length = 32 ) : string
리턴 string

get_user() 공개 메소드

Get user
public get_user ( $query ) : array
리턴 array

hash_pass() 공개 메소드

Hash the password
public hash_pass ( $password ) : string
리턴 string

reset_password() 공개 메소드

Resets a users password. Used by forgot password routine.
public reset_password ( $hash ) : boolean
리턴 boolean

send_new_password() 공개 메소드

------------------------------------------------------------------------
public send_new_password ( $user_id )

update_api_key() 공개 메소드

Update the API key in the user table
public update_api_key ( $user_api_key, $user_id ) : boolean
리턴 boolean

update_login_info() 공개 메소드

Update user login info, such as IP-address or login time.
public update_login_info ( $user_id ) : void
리턴 void

user_notes() 공개 메소드

Get all notes for a user.
public user_notes ( $user_id ) : array
리턴 array

username_check() 공개 메소드

Checks if a username is already in use.
public username_check ( $username, $id = '' ) : boolean
리턴 boolean

users_listings() 공개 메소드

Finds users active listings
public users_listings ( $listing_owner_id ) : string
리턴 string