Open Journal Systems  3.3.0
UserApiHandler Class Reference
Inheritance diagram for UserApiHandler:
PKPHandler

Public Member Functions

 _settingType ($settingName)
 
 authorize ($request, &$args, $roleAssignments)
 
 suggestUsername ($args, $request)
 
 updateUserMessageState ($args, $request)
 
- Public Member Functions inherited from PKPHandler
 __construct ()
 
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 getApiToken ()
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, &$contextsCount=null)
 
 index ($args, $request)
 
 initialize ($request)
 
 markRoleAssignmentsChecked ()
 
 requireSSL ()
 
 setApiToken ($apiToken)
 
 setDispatcher ($dispatcher)
 
 setEnforceRestrictedSite ($enforceRestrictedSite)
 
 setId ($id)
 
 setupTemplate ($request)
 
 validate ($requiredContexts=null, $request=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Data Fields inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_enforceRestrictedSite = true
 
 $_id
 
 $_isBackendPage = false
 
 $_roleAssignments = array()
 
 $_roleAssignmentsChecked = false
 
- Protected Attributes inherited from PKPHandler
 $_apiToken = null
 

Detailed Description

Class defining the headless AJAX API for backend user manipulation.

Definition at line 25 of file UserApiHandler.inc.php.

Member Function Documentation

◆ _settingType()

UserApiHandler::_settingType (   $settingName)

Checks the requested setting against a whitelist of settings that can be changed remotely.

Parameters
$settingNamestring
Returns
string a string representation of the setting type for further validation if the setting is whitelisted, otherwise null.

Definition at line 117 of file UserApiHandler.inc.php.

Referenced by updateUserMessageState().

◆ authorize()

UserApiHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
Returns
boolean

Reimplemented from PKPHandler.

Definition at line 33 of file UserApiHandler.inc.php.

References PKPHandler\addPolicy().

◆ suggestUsername()

UserApiHandler::suggestUsername (   $args,
  $request 
)

Get a suggested username, making sure it's not already used.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object

Definition at line 100 of file UserApiHandler.inc.php.

References Validation\suggestUsername().

◆ updateUserMessageState()

UserApiHandler::updateUserMessageState (   $args,
  $request 
)

Update the information whether user messages should be displayed or not.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object

Definition at line 54 of file UserApiHandler.inc.php.

References _settingType(), fatalError(), and DAORegistry\getDAO().


The documentation for this class was generated from the following file: