static method check_username [line 1061]
static void check_username(
$username)
|
|
check_username
This checks to make sure the username passed doesn't already exist in this instance of ampache
Tags:
Parameters:
static method create [line 611]
static void create(
$username,
$fullname,
$email,
$password,
$access)
|
|
create
inserts a new user into ampache
Tags:
Parameters:
static method fix_preferences [line 776]
static void fix_preferences(
$user_id)
|
|
fix_preferences
This is the new fix_preferences function, it does the following Remove Duplicates from user, add in missing If -1 is passed it also removes duplicates from the `preferences` table.
Tags:
Parameters:
static method get_from_username [line 117]
static void get_from_username(
$username)
|
|
get_from_username
This returns a built user from a username. This is a static function so it doesn't require an instance
Tags:
Parameters:
static method get_validation [line 958]
static void get_validation(
$username)
|
|
get_user_validation if user exists before activation can be done.
Tags:
Parameters:
static method rebuild_all_preferences [line 1080]
static void rebuild_all_preferences(
)
|
|
rebuild_all_preferences
This rebuilds the user preferences for all installed users, called by the plugin functions
Tags:
constructor __construct [line 48]
User __construct(
[
$user_id = 0])
|
|
Constructor
This function is the constructor object for the user class, it currently takes a username
Tags:
Parameters:
method activate_user [line 1028]
void activate_user(
$username)
|
|
Tags:
Parameters:
method delete [line 871]
delete
deletes this user and everything assoicated with it. This will affect ratings and tottal stats
Tags:
method delete_stats [line 859]
method disable [line 472]
disable
This disables the current user
Tags:
method enable [line 495]
enable
this enables the current user
Tags:
method format [line 660]
format
This function sets up the extra variables we need when we are displaying a user for an admin, these should not be normally called when creating a user object
Tags:
method format_favorites [line 711]
void format_favorites(
$items)
|
|
format_favorites
takes an array of objects and formats them corrrectly and returns a simply array with just <a href values
Tags:
Parameters:
method format_recommendations [line 739]
void format_recommendations(
$items,
$type)
|
|
format_recommendations
This takes an array of [object_id] = ratings and displays them in a semi-pretty format
Parameters:
method get_catalogs [line 135]
get_catalogs
This returns the catalogs as an array of ids that this user is allowed to access
Tags:
method get_favorites [line 220]
void get_favorites(
$type)
|
|
get_favorites
returns an array of your $type favorites
Parameters:
method get_ip_history [line 997]
void get_ip_history(
[
$count = ''], [
$distinct = ''])
|
|
get_ip_history
This returns the ip_history from the last Config::get('user_ip_cardinality') days
Tags:
Parameters:
method get_preferences [line 163]
void get_preferences(
[
$user_id = 0], [
$type = 0])
|
|
get_preferences
This is a little more complicate now that we've got many types of preferences This funtions pulls all of them an arranges them into a spiffy little array You can specify a type to limit it to a single type of preference []['title'] = ucased type name []['prefs'] = array(array('name','display','value')); []['admin'] = t/f value if this is an admin only section
Parameters:
method get_recently_played [line 976]
void get_recently_played(
$limit, [
$type = ''])
|
|
get_recently_played
This gets the recently played items for this user respecting the limit passed
Tags:
Parameters:
method get_recommendations [line 272]
void get_recommendations(
$type)
|
|
get_recommendations This returns recommended objects of $type. The recommendations are based on voodoo economics,the phase of the moon and my current BAL.
Parameters:
method has_access [line 360]
void has_access(
$needed_level)
|
|
has_access
this function checkes to see if this user has access to the passed action (pass a level requirement)
Parameters:
method insert_ip_history [line 577]
void insert_ip_history(
)
|
|
insert_ip_history
This inserts a row into the IP History recording this user at this address at this time in this place, doing this thing.. you get the point
Tags:
method is_logged_in [line 338]
is_logged_in
checks to see if $this user is logged in returns their current IP if they are logged in
Tags:
method is_online [line 948]
void is_online(
[
$delay = 1200])
|
|
is_online
delay how long since last_seen in seconds default of 20 min calcs difference between now and last_seen if less than delay, we consider them still online
Tags:
Parameters:
method is_xmlrpc [line 1042]
method load_playlist [line 104]
load_playlist
This is called once per page load it makes sure that this session has a tmp_playlist, creating it if it doesn't, then sets $this->playlist as a tmp_playlist object that can be fiddled with later on
Tags:
method set_preferences [line 202]
set_preferences
sets the prefs for this specific user
Tags:
method update [line 376]
update
This function is an all encompasing update function that calls the mini ones does all the error checking and all that good stuff
Tags:
Parameters:
method update_access [line 508]
void update_access(
$new_access)
|
|
update_access
updates their access level
Tags:
Parameters:
method update_email [line 460]
void update_email(
$new_email)
|
|
update_email
updates their email address
Tags:
Parameters:
method update_fullname [line 448]
void update_fullname(
$new_fullname)
|
|
update_fullname
updates their fullname
Tags:
Parameters:
method update_last_seen [line 527]
method update_password [line 641]
void update_password(
$new_password)
|
|
update_password
updates a users password
Tags:
Parameters:
method update_stats [line 538]
void update_stats(
$song_id)
|
|
update_user_stats
updates the playcount mojo for this specific user
Tags:
Parameters:
method update_username [line 418]
void update_username(
$new_username)
|
|
update_username
updates their username
Tags:
Parameters:
method update_validation [line 433]
void update_validation(
$new_validation)
|
|
update_validation
This is used by the registration mumbojumbo Use this function to update the validation key NOTE: crap this doesn't have update_item the humanity of it all
Tags:
Parameters: