Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit 7c6e31e

Browse files
committed
Merge branch '1.5'
2 parents 40519a6 + 058baf2 commit 7c6e31e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/system/AdminModule/Resources/views/AdminInterface/updateCheck.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if hasPermission('ZikulaAdminModule::', '::', 'ACCESS_ADMIN') and updateCheckHelper.enabled %}
2-
<div id="updatecheck" class="alert" style="background-color: #F7F7F7">
2+
<div id="updatecheck" class="alert alert-success">
33
<div class="row">
44
<div class="col-sm-12">
55
<i class="close" data-dismiss="alert">&times;</i>

src/system/ZAuthModule/AuthenticationMethod/AbstractNativeAuthenticationMethod.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ protected function authenticateByField(array $data, $field = 'uname')
109109
$this->session->getFlashBag()->add('error', $this->translator->__('Incorrect login credentials'));
110110
}
111111
} else {
112-
$this->session->getFlashBag()->add('error', $this->translator->__f('User not found with %field %value', ['%field' => $field, '%value' => $data[$field]]));
112+
$this->session->getFlashBag()->add('error', $this->translator->__f('User not found with %field %value using %method method.', [
113+
'%field' => $field,
114+
'%value' => $data[$field],
115+
'%method' => $this->getDisplayName()
116+
]));
113117
}
114118
}
115119

src/system/ZAuthModule/AuthenticationMethod/NativeEitherAuthenticationMethod.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ public function getLoginTemplateName($type = 'page', $position = 'left')
6969
*/
7070
public function authenticate(array $data = [])
7171
{
72-
$field = filter_var($data['either'], FILTER_VALIDATE_EMAIL) ? 'email' : 'uname';
73-
$data[$field] = $data['either'];
72+
$field = 'email'; // default
73+
if (isset($data['either'])) {
74+
$field = filter_var($data['either'], FILTER_VALIDATE_EMAIL) ? 'email' : 'uname';
75+
$data[$field] = $data['either'];
76+
}
7477

7578
return $this->authenticateByField($data, $field);
7679
}

0 commit comments

Comments
 (0)