Login

Main repository for user data.

Spawns users to other repositories via controller functions.


 * Database: Login

public function isRequestValid($requester)
Make sure the request is made through https Only allow POST requests

public function adminresettoken
Allows admin users to reset the token of a specific user

public function admincreateusers
Allows admin users to create new users

public function userCreationSucceded($newUsers)
Get users from the DB and compares it with the supplied array, return the users that are present in both.

public static function searchMultiArray($array, $key =, $value = )
Search a multidimensional array for $key->value Returns true if found; false if not found.

public function setuserdata
Sets the data of a specific user

public function getuserdata
Gets the data of a specific user

public function getuserlist
Gets a list of all users

public function login
Authenticates a user with the passed credentials. If error occurs, error flag is set and error message(s) are returned. If authentication is successful, session contains: userID username confirmed active token date_added date_modified nickname

public function notify
Notifies registered apps that user has authenticted

public function create
This function creates a new user. Validates the passed data and returns error and error description. If the data is valid, a new user is created.

public function pushadminuser
Calls all registered apps and instructs to insert a new admin user.

public function update
Updates userid with the passed data. Verifies that user and validates the data.

public function confirm
Sets confirmed flag to 1 for userid.

public function delete
Deletes passed userid.

public function resettoken
Creates the token for the password reset request.

public function changepassword
Change password for user. Validates token and user.