PHP Class Users_model, 68kb

Inheritance: extends CI_Model
Afficher le fichier Open project: 68kb/68kb Class Usage Examples

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
_get_user_by_id ( $user_id ) : mixed Get User By id
_get_user_by_username ( $user_name ) : mixed Get User By id

Method Details

__construct() public méthode

Constructor
public __construct ( ) : void
Résultat void

add_user() public méthode

Add User
public add_user ( $data ) : mixed
Résultat mixed

delete_user() public méthode

Delete User
public delete_user ( $user_id ) : boolean
Résultat boolean

edit_user() public méthode

Edit User
public edit_user ( $user_id, $data ) : boolean
Résultat boolean

email_check() public méthode

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

generate_api_key() public méthode

generate_api_key function.
public generate_api_key ( $length = 32 ) : string
Résultat string

get_user() public méthode

Get user
public get_user ( $query ) : array
Résultat array

hash_pass() public méthode

Hash the password
public hash_pass ( $password ) : string
Résultat string

reset_password() public méthode

Resets a users password. Used by forgot password routine.
public reset_password ( $hash ) : boolean
Résultat boolean

send_new_password() public méthode

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

update_api_key() public méthode

Update the API key in the user table
public update_api_key ( $user_api_key, $user_id ) : boolean
Résultat boolean

update_login_info() public méthode

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

user_notes() public méthode

Get all notes for a user.
public user_notes ( $user_id ) : array
Résultat array

username_check() public méthode

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

users_listings() public méthode

Finds users active listings
public users_listings ( $listing_owner_id ) : string
Résultat string