3 Commits
1.1.0 ... 1.1.1

Author SHA1 Message Date
Paweł Suwiński
53162e2a91 version and CHANGELOG update 2020-11-26 09:13:44 +01:00
Paweł Suwiński
50699c4caa fix notice only variables should be passed by reference 2020-11-26 09:10:36 +01:00
Paweł Suwiński
6d9b5f8300 README.md reediting 2020-11-19 12:35:14 +01:00
5 changed files with 20 additions and 12 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## [1.1.1] - 2020-11-26
### Fixed
- notice "only variables should be passed by reference"
## [1.1.0] - 2020-11-19
### Added

View File

@@ -9,12 +9,12 @@ Additional security can be set:
- *revoke threshold*: login failures limit causing revoke of the generated password
- *minimum request period*: a time in seconds after which another password can be generated
Signup and user creation on first login takes place only in case of using email
as username (not to be confused with the `authloginviaemail` global setting) if
not prevented (global setting `authpreventaccountcreation`) and parts of email
address may be mapped to profile fields using PCRE expressions.
Signup and user creation on first login if not prevented (global setting
`authpreventaccountcreation`) takes place only in case of using email as
username (not to be confused with the `authloginviaemail` global setting) and
parts of email address may be mapped to profile fields using PCRE expressions.
Auth instruction setting (global `auth_instructions`) is recommended depending
on the adopted user account policy and plugin settings.
on the adopted user account policy and plugin configuration.
See also: `fieldsmapping_help` setting form for [mapping usage example](lang/en/auth_emailotp.php).

View File

@@ -239,10 +239,9 @@ class auth_plugin_emailotp extends auth_plugin_base {
return true;
}
// Log reader required - silently return failure on absence.
if (!$reader = reset(get_log_manager()->get_readers('\core\log\sql_reader'))) {
return false;
}
return $reader->get_events_select_count(
$readers = get_log_manager()->get_readers('\core\log\sql_reader');
$reader = reset($readers);
return $reader && $reader->get_events_select_count(
'component = ? AND action = ? AND timecreated >= ? AND other = ?',
array(
self::COMPONENT_NAME,

View File

@@ -65,7 +65,8 @@ if ($ADMIN->fulltree) {
get_string('minrequestperiod_help', 'auth_emailotp')
) extends admin_setting_configtext {
public function __construct($name, $visiblename, $description) {
$logreader = reset(get_log_manager()->get_readers('\core\log\sql_reader'));
$readers = get_log_manager()->get_readers('\core\log\sql_reader');
$logreader = reset($readers);
parent::__construct($name, $visiblename, $description, $logreader ? 120 : 0, PARAM_INT);
if (!$logreader && !empty($this->get_setting())) {
$this->description .= ' '.get_string('logstorerequired', 'auth_emailotp',

View File

@@ -24,8 +24,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020111903; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2020112600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2018120304; // Requires this Moodle version.
$plugin->component = 'auth_emailotp'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '1.1.0';
$plugin->release = '1.1.1';