phpDocumentor ninko
functions
[ class tree: ninko ] [ index: ninko ] [ all elements ]

Procedural File: user.php

Source Location: /include/functions/user.php

Page Details

user.php

Functions that relate directly to the user

Author:  Nijiko Yonskai <me@nijikokun.com>
Version:  1.2
Copyright:  (c) 2010 ANIGAIKU
Functions
add_user  [line 196]

string|boolean add_user( string $username, string $password, string $password_again, string $email, string $age  )

Adds user to the database

Registration function, this controls the sign up functionality.

Parameters:
string   $username:  username of user being added
string   $password:  password of user being added
string   $password_again:  password again to be checked against first $password
string   $email:  email incase email registration is turned on
string   $age:  mm/dd/yyyy

API Tags:
Global:  array $config:


[ Top ]
avatar_upload  [line 962]

boolean|string avatar_upload( string $use, resource $_FILES  )

Uploads an avatar to the site for the user to use.

Parameters:
string   $use:  data from the user we are to use for the filename
resource   $_FILES:  file to be uploaded

API Tags:
Global:  array $config:


[ Top ]
count_users  [line 676]

integer count_users( [integer|boolean $days = false]  )

Count all the users or users in a certain amount of days.

Parameters:
integer|boolean   $days:  the amount of days you want the count to go back. e.g, a year would be 365 days.


[ Top ]
get_avatar  [line 873]

string|boolean get_avatar( integer $id  )

Grabs the users avatar by their id

Parameters:
integer   $id:  used to retrieve the user data

API Tags:
Global:  array $config:


[ Top ]
is_online  [line 704]

boolean is_online( $id, integer $days  )

Checks to see if the user set by id is online.

Parameters:
integer   $days:  the amount of days you want the count to go back. e.g, a year would be 365 days.
   $id: 

API Tags:
Global:  array $config:


[ Top ]
login  [line 21]

int|boolean login( boolean|string $username, [boolean|string $email = false], string $password  )

Signs user in based on username or email

Parameters:
boolean|string   $username:  username or false
boolean|string   $email:  user email or false
string   $password:  user password

API Tags:
Global:  array $config:


[ Top ]
type  [line 472]

boolean|integer type( string $username  )

Checks to see what type of user we are dealing with

Parameters:
string   $username:  username of user to be checked against


[ Top ]
update_user  [line 800]

boolean|integer update_user( boolean|integer $id, [boolean|string $username = false], string $field, mixed $value  )

Updates user

Updates the user using either the id, or username. Only updates one field at a time.

Parameters:
boolean|integer   $id:  id used to update data, or false for username
boolean|string   $username:  username used to update data, or false for id
string   $field:  field on database to be updated
mixed   $value:  data to update $field


[ Top ]
username_check  [line 520]

boolean|integer username_check( string $username  )

Checks to see whether user exists by username

Parameters:
string   $username:  username of user to be checked against


[ Top ]
username_style  [line 542]

boolean|integer username_style( array $data  )

Styles username based on information given.

Parameters:
array   $data: 


[ Top ]
users_online  [line 734]

array users_online( [boolean $admins = false]  )

Checks to see what users are online

Parameters:
boolean   $admins:  check for admins only?

API Tags:
Global:  array $config:


[ Top ]
user_data  [line 576]

boolean|integer user_data( boolean|integer $id, [boolean|string $username = false], [boolean|string $current = false], [boolean|integer $limit = 1]  )

Grab user information using an id or username

Parameters:
boolean|integer   $id:  id used to obtain data, or false for username
boolean|string   $username:  username used to obtain data, or false for id
boolean|integer   $limit:  limit how many users?
boolean|string   $current:  username used to obtain data, or false for id

API Tags:
Global:  array $config:


[ Top ]
validate_user  [line 385]

integer|boolean validate_user( string $email, string $key  )

Validates user

Validates user using key sent to the user via email upon registration. Can be turned on/off

Parameters:
string   $email:  email of user being validated
string   $key:  key given at registration


[ Top ]


Documentation generated on Sat, 06 Feb 2010 10:46:06 -0500 by phpDocumentor 1.4.3