Skip to content

ojsde/authorRegistration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Key data

Description

When a user wants to register as author, it can easily happen that the "register as author" checkbox is overlooked. Thus this checkbox is actived automatically when the user is likely to be an author - that means if the user gets to the registration form via the "about/submission" or the "information/authors" page.

Installation

This is a minor patch - it's just necessary to add this code snippet

	$referrer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
	$authorPattern = '/information\/authors|about\/submissions/';
	if (preg_match($authorPattern, $referrer)) {
		$this->setData('registerAsAuthor', 1);
	}

to the following file

	classes/user/form/RegistrationForm.inc.php

to the function

	initData()

right after this line:

	$this->setData('registerAsReader', 1);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published