Skip to content
Snippets Groups Projects
Commit 4f3902dd authored by Robert Lange's avatar Robert Lange Committed by Dorian Merz
Browse files

refs #16180 [fid_adlr] change password requirements

* for registration and password change (add adlr form and add embed in module.config)
* no special sign required
* but capital letter needed instead
* change password validation error text for adlr
parent f420e7a5
No related merge requests found
......@@ -23,6 +23,7 @@
use fid_adlr\Controller\MyResearchController;
use fid_adlr\Controller\MyResearchControllerFactory;
use fid_adlr\Helper\Rss;
use fid\FormModel\PasswordChangeModel;
use Zend\Router\Http\Regex;
use Zend\ServiceManager\Factory\InvokableFactory;
......@@ -31,6 +32,7 @@ $config = [
'user-create-form' => require 'user-create-form.php',
'user-update-form' => require 'user-update-form.php',
'admin-edit-form' => require 'admin-edit-form.php',
PasswordChangeModel::class => require 'password-change-form.php',
],
'controllers' => [
'factories' => [
......
<?php
/**
* Copyright (C) 2019 Leipzig University Library
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2
*/
use Zend\Validator\Regex;
return [
'input_filter' => [
'password' => [
'validators' => [
Regex::class => [
'name' => Regex::class,
'options' => [
'pattern' => '/(?:.*[0-9].*[A-Z].*|.*[A-Z].*[0-9].*)/',
'messages' => [
Regex::NOT_MATCH => 'error_password_pattern',
],
],
],
],
],
],
];
\ No newline at end of file
......@@ -27,6 +27,7 @@ use Zend\Form\Element\Checkbox;
use Zend\Form\Element\Select;
use Zend\Form\Element\Text;
use Zend\Validator\NotEmpty;
use Zend\Validator\Regex;
use Zend\Validator\StringLength;
return [
......@@ -149,5 +150,18 @@ return [
'college' => [
'required' => true,
],
'password' => [
'validators' => [
Regex::class => [
'name' => Regex::class,
'options' => [
'pattern' => '/(?:.*[0-9].*[A-Z].*|.*[A-Z].*[0-9].*)/',
'messages' => [
Regex::NOT_MATCH => 'error_password_pattern',
],
],
],
],
],
],
];
\ No newline at end of file
......@@ -55,3 +55,6 @@ Adlr Home Services Open Access Title = "adlr.link fördert Open Access"
Adlr Home Services Open Access Text = "Zahlreiche Ressourcen, die man über adlr.link findet, sind frei zugänglich. Wir kennzeichnen außerdem Open Access-Dokumente bei den Suchergebnissen besonders."
Adlr Home Services Resources Title = "adlr.link lizenziert Ressourcen"
Adlr Home Services Resources Text = "Über adlr.link haben alle Nutzerinnen und Nutzer, die hauptberuflich in der Wissenschaft arbeiten, Zugriff auf die spezielle FID-Lizenzen. Außerdem haben wir ein ständig wachsendes Angebot an eigens für adlr.link lizenzierten E-Books."
# 16180
error_password_pattern = "Das Passwort muss mindestens eine Ziffer und einen Großbuchstaben enthalten."
\ No newline at end of file
......@@ -52,3 +52,6 @@ Adlr Home Services Open Access Title = "adlr.link promotes Open Access"
Adlr Home Services Open Access Text = "Many of the resources found via adlr.link are freely accessible. We also mark Open Access documents specifically in the search results."
Adlr Home Services Resources Title = "adlr.link licenses resources"
Adlr Home Services Resources Text = "Via adlr.link, all users who work full-time in science have access to special FID licenses. In addition, we have a constantly growing range of e-books licensed specifically for adlr.link."
# 16180
error_password_pattern = "The password needs to contain at least one digit and one capital letter."
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment