Provides user authentication functions for the admin
This is the code documentation for the SproutCMS project
Search documentation |
class AdminAuthProvides user authentication functions for the admin
Variables
Functions
public changePasswordunknown AdminAuth::changePassword ( string $new_password [, int $operator_id ] ); Sets the password for a operator, or the current operator if a operator-id is not specified. public checkAlgorithm (from Auth)bool Auth::checkAlgorithm ( int $algorithm ); Checks if a given password algorithm is available public checkLoginvoid AdminAuth::checkLogin ( ); If the user is not logged, redirect them to a login page public checkPasswordunknown AdminAuth::checkPassword ( mixed $password [, mixed $operator_id ] ); Checks the password on the database matches the one provided For re-authenticating certain actions of logged in operators public checkRateLimitbool|array AdminAuth::checkRateLimit ( mixed $username , mixed $ip ); Does a rate-limit check for admin logins against the login_attempts table public defaultAlgorithm (from Auth)int Auth::defaultAlgorithm ( ); Return the algorithm for new accounts. Existing accounts will be re-crypted into this algorithm upon next login. public doPasswordCheck (from Auth)bool Auth::doPasswordCheck ( string $known_hash , int $algorithm , string $salt , string $user_string ); Check a password hash against an entered password public getAllCategoriesunknown AdminAuth::getAllCategories ( ); Gets a list of all of the admin categories Returned as an array of id => name public getDetailsbool|array AdminAuth::getDetails ( ); Gets the id, name, username and email of the currently logged in operator. N.B. the id will be 0 for remote users public getIdunknown AdminAuth::getId ( ); Returns the id of the currently logged in operator public getLocalIdint AdminAuth::getLocalId ( ); Fetches the ID of current operator if and only if they're a local operator, otherwise 0. public getOperatorCategoriesunknown AdminAuth::getOperatorCategories ( ); Returns an array of all categories the currently logged in operator is in public getPrimaryCategoryIdint AdminAuth::getPrimaryCategoryId ( ); Get the ID of the 'Primary administrators' category i.e. the first category with permission to manage operators public hasDatabaseRecordbool AdminAuth::hasDatabaseRecord ( ); Does the record-id for this login correspond to a local database record? public hashPassword (from Auth)array Auth::hashPassword ( string $password [, int $algorithm ] ); Return a hashed password, password algorithm, and salt, for inserting into the database public inCategoryunknown AdminAuth::inCategory ( int $category_id ); Returns true if the currently logged in user is in the specified category. Always returns true for remotely-logged in users. public injectLocalSuperConfarray AdminAuth::injectLocalSuperConf ( string $username , string $pass_hash , string $pass_salt ); Load the existing super-operators list from config, inject another operator, return new array public isLoggedInboolean AdminAuth::isLoggedIn ( ); Check if the user is logged in or not public isSuperbool AdminAuth::isSuper ( ); A super-operator -- has access to everything (dev tools, all permissions, etc) public logoutunknown AdminAuth::logout ( ); Logs an operator out public processLocalboolean AdminAuth::processLocal ( string $username , string $password ); Process a local (developer) login, with details stored in a config file public processLoginboolean AdminAuth::processLogin ( string $username , string $password ); Processes the login by a operator with the specified username and password public processOpenidboolean AdminAuth::processOpenid ( string $openid ); Stub function for future development using OpenID public processRemoteboolean AdminAuth::processRemote ( string $username , string $password ); Process a remote (developer) login, as provided by the external web service public saveLoginAttemptvoid AdminAuth::saveLoginAttempt ( mixed $username , mixed $ip , mixed $success ); Store a login attempt (used for rate checking) |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |