Public Member Functions | |
canAdminister ($conferenceId, $userId) | |
checkCredentials ($username, $password) | |
encryptCredentials ($username, $password, $encryption=false) | |
generatePassword ($length=8) | |
generatePasswordResetHash ($userId) | |
isAuthor ($conferenceId=-1, $schedConfId=-1) | |
isAuthorized ($roleId, $conferenceId=0, $schedConfId=0) | |
isConferenceManager ($conferenceId=-1) | |
isDirector ($conferenceId=-1, $schedConfId=-1) | |
isLoggedIn () | |
isReader ($conferenceId=-1, $schedConfId=-1) | |
isReviewer ($conferenceId=-1, $schedConfId=-1) | |
isSiteAdmin () | |
isTrackDirector ($conferenceId=-1, $schedConfId=-1) | |
& | login ($username, $password, &$reason, $remember=false) |
logout () | |
redirectLogin ($message=null, $args=array()) | |
suggestUsername ($firstName, $lastName) |
Definition at line 19 of file Validation.inc.php.
Validation.canAdminister | ( | $ | conferenceId, | |
$ | userId | |||
) |
Check whether a user is allowed to administer another user.
$conferenceId | int | |
$userId | int |
Definition at line 348 of file Validation.inc.php.
References isConferenceManager(), and isSiteAdmin().
Referenced by PeopleHandler.disableUser(), PeopleHandler.editUser(), PeopleHandler.mergeUsers(), LoginHandler.signInAsUser(), and PeopleHandler.updateUser().
Validation.checkCredentials | ( | $ | username, | |
$ | password | |||
) |
Check if a user's credentials are valid.
$username | string username | |
$password | string unencrypted password |
Definition at line 145 of file Validation.inc.php.
References encryptCredentials().
Referenced by ChangePasswordForm.ChangePasswordForm(), CreateAccountForm.CreateAccountForm(), and LoginChangePasswordForm.LoginChangePasswordForm().
Validation.encryptCredentials | ( | $ | username, | |
$ | password, | |||
$ | encryption = false | |||
) |
Encrypt user passwords for database storage. The username is used as a unique salt to make dictionary attacks against a compromised database more difficult.
$username | string username | |
$password | string unencrypted password | |
$encryption | string optional encryption algorithm to use, defaulting to the value from the site configuration |
Definition at line 206 of file Validation.inc.php.
Referenced by checkCredentials(), Install.createData(), LoginChangePasswordForm.execute(), CreateAccountForm.execute(), ChangePasswordForm.execute(), CreateReviewerForm.execute(), UserRegistrationForm.execute(), UserManagementForm.execute(), UserXMLParser.generatePassword(), ImportOCS1.importPapers(), ImportOCS1.importRegistrations(), ImportOCS1.importReviewers(), UserXMLParser.importUsers(), and login().
Validation.generatePassword | ( | $ | length = 8 |
) |
Generate a random password. Assumes the random number generator has already been seeded.
$length | int the length of the password to generate (default 8) |
Definition at line 230 of file Validation.inc.php.
Referenced by LoginChangePasswordForm.execute(), ChangePasswordForm.execute(), CreateReviewerForm.execute(), UserManagementForm.execute(), UserXMLParser.generatePassword(), ImportOCS1.importPapers(), ImportOCS1.importRegistrations(), and ImportOCS1.importReviewers().
Validation.generatePasswordResetHash | ( | $ | userId | ) |
Generate a hash value to use for confirmation to reset a password.
$userId | int |
Definition at line 246 of file Validation.inc.php.
Referenced by TrackDirectorAction.notifyReviewer(), TrackDirectorAction.remindReviewer(), and ReviewReminder.sendReminder().
Validation.isAuthor | ( | $ | conferenceId = -1 , |
|
$ | schedConfId = -1 | |||
) |
Shortcut for checking authorization as author.
$conferenceId | int |
Definition at line 329 of file Validation.inc.php.
References isAuthorized().
Referenced by ProfileForm.execute(), UserHandler.getRoleDataForConference(), ProfileForm.initData(), and SubmitHandler.submit().
Validation.isAuthorized | ( | $ | roleId, | |
$ | conferenceId = 0 , |
|||
$ | schedConfId = 0 | |||
) |
Check if a user is authorized to access the specified role in the specified conference.
$roleId | int | |
$conferenceId | optional (e.g., for global site admin role), the ID of the conference |
Definition at line 172 of file Validation.inc.php.
References Request.getConference(), Request.getSchedConf(), and isLoggedIn().
Referenced by isAuthor(), isConferenceManager(), isDirector(), isReader(), isReviewer(), isSiteAdmin(), and isTrackDirector().
Validation.isConferenceManager | ( | $ | conferenceId = -1 |
) |
Shortcut for checking authorization as conference manager.
$conferenceId | int |
Definition at line 293 of file Validation.inc.php.
References isAuthorized().
Referenced by canAdminister(), CommentHandler.delete(), NotificationSettingsForm.display(), EmailHandler.email(), PeopleHandler.enroll(), UserHandler.getRoleDataForConference(), SchedConfAction.mayViewPapers(), SchedConfAction.mayViewProceedings(), SchedConfAction.mayViewSchedConf(), SchedConfHandler.setupTemplate(), TimelineForm.TimelineForm(), PeopleHandler.unEnroll(), EmailHandler.validate(), and CommentHandler.view().
Validation.isDirector | ( | $ | conferenceId = -1 , |
|
$ | schedConfId = -1 | |||
) |
Shortcut for checking Authorization as director.
$conferenceId | int |
Definition at line 302 of file Validation.inc.php.
References isAuthorized().
Referenced by ConferenceHistoryHandler.conferenceEventLogType(), NotificationSettingsForm.display(), EmailHandler.email(), TrackDirectorAction.emailDirectorDecisionComment(), UserHandler.getRoleDataForConference(), AuthorHandler.index(), AuthorAction.mayEditPaper(), SchedConfAction.mayViewPapers(), SchedConfAction.mayViewProceedings(), SchedConfAction.mayViewSchedConf(), TrackDirectorAction.postDirectorDecisionComment(), TrackDirectorAction.postPeerReviewComment(), TrackDirectorHandler.setupTemplate(), SchedConfHandler.setupTemplate(), SubmissionEditHandler.submissionEmailLog(), SubmissionEditHandler.submissionEmailLogType(), SubmissionEditHandler.submissionEventLog(), SubmissionEditHandler.submissionEventLogType(), SubmissionEditHandler.submissionHistory(), TrackDirectorHandler.validate(), SubmissionEditHandler.validate(), SubmitHandler.validate(), TrackDirectorAction.viewDirectorDecisionComments(), and TrackDirectorAction.viewPeerReviewComments().
Validation.isLoggedIn | ( | ) |
Check if the user must change their password in order to log in.
Definition at line 272 of file Validation.inc.php.
Referenced by Handler.Handler(), isAuthorized(), SchedConfHandler.register(), UserHandler.validate(), PaperHandler.validate(), CommentHandler.validate(), ReviewerHandler.validateAccessKey(), PaperHandler.viewPaper(), and PaperHandler.viewRST().
Validation.isReader | ( | $ | conferenceId = -1 , |
|
$ | schedConfId = -1 | |||
) |
Shortcut for checking authorization as reader.
$conferenceId | int |
Definition at line 338 of file Validation.inc.php.
References isAuthorized().
Referenced by ProfileForm.execute(), ProfileForm.initData(), and SchedConfAction.mayViewPapers().
Validation.isReviewer | ( | $ | conferenceId = -1 , |
|
$ | schedConfId = -1 | |||
) |
Shortcut for checking authorization as reviewer.
$conferenceId | int |
Definition at line 320 of file Validation.inc.php.
References isAuthorized().
Referenced by NotificationSettingsForm.display(), ProfileForm.execute(), UserHandler.getRoleDataForConference(), and ProfileForm.initData().
Validation.isSiteAdmin | ( | ) |
Shortcut for checking Authorization as site admin.
Definition at line 284 of file Validation.inc.php.
References isAuthorized().
Referenced by canAdminister(), NotificationSettingsForm.display(), EmailHandler.email(), PeopleHandler.enroll(), TranslatorPlugin.manage(), SchedConfAction.mayViewPapers(), SchedConfAction.mayViewProceedings(), SchedConfAction.mayViewSchedConf(), PluginHandler.plugins(), and PeopleHandler.unEnroll().
Validation.isTrackDirector | ( | $ | conferenceId = -1 , |
|
$ | schedConfId = -1 | |||
) |
Shortcut for checking authorization as track director.
$conferenceId | int |
Definition at line 311 of file Validation.inc.php.
References isAuthorized().
Referenced by EmailHandler.email(), UserHandler.getRoleDataForConference(), AuthorHandler.index(), AuthorAction.mayEditPaper(), SchedConfAction.mayViewPapers(), SchedConfAction.mayViewProceedings(), SchedConfAction.mayViewSchedConf(), TrackDirectorHandler.validate(), and SubmitHandler.validate().
& Validation.login | ( | $ | username, | |
$ | password, | |||
&$ | reason, | |||
$ | remember = false | |||
) |
Authenticate user credentials and mark the user as logged in in the current session.
$username | string | |
$password | string unencrypted password | |
$reason | string reference to string to receive the reason an account was disabled; null otherwise | |
$remember | boolean remember a user's session past the current browser session |
Definition at line 29 of file Validation.inc.php.
References encryptCredentials().
Referenced by CreateAccountHandler.createAccount(), UserRegistrationForm.execute(), and redirectLogin().
Validation.logout | ( | ) |
Mark the user as logged out in the current session.
Definition at line 106 of file Validation.inc.php.
Referenced by ReviewerHandler.validateAccessKey().
Validation.redirectLogin | ( | $ | message = null , |
|
$ | args = array() | |||
) |
Redirect to the login page, appending the current URL as the source.
Definition at line 127 of file Validation.inc.php.
References login(), and Request.redirect().
Referenced by CommentHandler.add(), RTAdminHandler.index(), UserHandler.validate(), TrackDirectorHandler.validate(), PaperHandler.validate(), and CommentHandler.validate().
Validation.suggestUsername | ( | $ | firstName, | |
$ | lastName | |||
) |
Suggest a username given the first and last names.
Definition at line 259 of file Validation.inc.php.
Referenced by SubmissionEditHandler.suggestUsername(), and PeopleHandler.suggestUsername().