seek_quarry
[ class tree: seek_quarry ] [ index: seek_quarry ] [ all elements ]

Class: UserModel

Source Location: /models/user_model.php

Class Overview

Model
   |
   --UserModel

This class is used to handle database statements related to User Administration


Author(s):

  • Chris Pollett

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Model

Model::__construct()
Sets up the database manager that will be used and name of the search engine database
Model::boldKeywords()
Given a string, wraps in bold html tags a set of key words it contains.
Model::formatPageResults()
Given an array page summarries, for each summary extracts snippets which are related to a set of search words. For each snippet, bold faces the search terms, and then creates a new summary array.
Model::getDbmsList()
Gets a list of all DBMS that work with the search engine
Model::getSnippets()
Given a string, extracts a snippets of text related to a given set of key words. For a given word a snippet is a window of characters to its left and right that is less than a maximum total number of characters.
Model::isSingleLocalhost()
Used to determine if an action involves just one yioop instance on the current local machine or not
Model::loginDbms()
Returns whether the provided dbms needs a login and password or not (sqlite or sqlite3)
Model::translateDb()
Used to get the translation of a string_id stored in the database to the given locale.

Class Details

[line 50]
This class is used to handle database statements related to User Administration



Tags:

author:  Chris Pollett


[ Top ]


Class Methods


constructor __construct [line 57]

UserModel __construct( )

Just calls the parent class constructor



Overrides Model::__construct() (Sets up the database manager that will be used and name of the search engine database)

[ Top ]

method addUser [line 227]

void addUser( string $username, string $password)

Add a user with a given username and password to the list of users that can login to the admin panel



Parameters:

string   $username   the username of the user to be added
string   $password   the password of the user to be added

[ Top ]

method addUserRole [line 258]

void addUserRole( string $userid, string $roleid)

Adds a role to a given user



Parameters:

string   $userid   the id of the user to add the role to
string   $roleid   the id of the role to add

[ Top ]

method deleteUser [line 243]

void deleteUser( string $username)

Deletes a user by username from the list of users that can login to the admin panel



Parameters:

string   $username   the login name of the user to delete

[ Top ]

method deleteUserRole [line 274]

void deleteUserRole( string $userid, string $roleid)

Deletes a role from a given user



Parameters:

string   $userid   the id of the user to delete the role from
string   $roleid   the id of the role to delete

[ Top ]

method getUserActivities [line 69]

void getUserActivities( string $user_id)

Get a list of admin activities that a user is allowed to perform.

This includes their name and their associated method.




Parameters:

string   $user_id   id of user to get activities fors

[ Top ]

method getUserList [line 206]

array getUserList( )

Returns an array of all user_names



Tags:

return:  a list of usernames


[ Top ]

method getUserRoles [line 169]

array getUserRoles( string $user_id)

Gets all the roles associated with a user id



Tags:

return:  of role_ids and their names


Parameters:

string   $user_id   the user_id to get roles of

[ Top ]

method getUserSession [line 130]

array getUserSession( int $user_id)

Returns $_SESSION variable of given user from the last time logged in.



Tags:

return:  user's session data


Parameters:

int   $user_id   id of user to get session for

[ Top ]

method setUserSession [line 150]

void setUserSession( int $user_id, array $session)

Stores into DB the $session associative array of given user



Parameters:

int   $user_id   id of user to store session for
array   $session   session data for the given user

[ Top ]


Documentation generated by phpDocumentor 1.4.3