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

Commit a411975

Browse files
committed
Merge branch '1.5'
2 parents 7c6e31e + 45420f2 commit a411975

File tree

7 files changed

+38
-31
lines changed

7 files changed

+38
-31
lines changed

composer.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/system/AdminModule/Helper/UpdateCheckHelper.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,13 @@ public function checkForUpdates()
142142
} else {
143143
$this->releases = $newVersionInfo;
144144
$this->checked = true;
145-
$this->updateversion = $this->releases[0]['tag_name'];
146-
//updateversion - get latest version from releases - move all git releases/updatechecker management to separate class
145+
foreach ($this->releases as $release) {
146+
if (true === $release['prerelease']) {
147+
continue;
148+
}
149+
$this->updateversion = $release['tag_name'];
150+
break;
151+
}
147152
}
148153
}
149154

src/system/UsersModule/Entity/Repository/UserRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public function persistAndFlush(UserEntity $user)
4141

4242
public function removeAndFlush(UserEntity $user)
4343
{
44+
foreach ($user->getAttributes() as $attribute) {
45+
// this should be unnecessary because cascade = all but MySQL 5.7 not working with that
46+
$this->_em->remove($attribute);
47+
}
4448
$this->_em->remove($user);
4549
$this->_em->flush($user);
4650
}

src/system/UsersModule/Helper/AccessHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ public function loginAllowed(UserEntity $user)
7979
case UsersConstant::ACTIVATED_ACTIVE:
8080
return true;
8181
case UsersConstant::ACTIVATED_INACTIVE:
82-
$this->session->getFlashBag()->add('error', $this->translator->__('Your account has been disabled. Please contact a site administrator for more information.'));
82+
$this->session->getFlashBag()->add('error', $this->translator->__('Login Denied: Your account has been disabled. Please contact a site administrator for more information.'));
8383

8484
return false;
8585
case UsersConstant::ACTIVATED_PENDING_DELETE:
86-
$this->session->getFlashBag()->add('error', $this->translator->__('Your account has been disabled and is scheduled for removal. Please contact a site administrator for more information.'));
86+
$this->session->getFlashBag()->add('error', $this->translator->__('Login Denied: Your account has been disabled and is scheduled for removal. Please contact a site administrator for more information.'));
8787

8888
return false;
8989
case UsersConstant::ACTIVATED_PENDING_REG:
90-
$this->session->getFlashBag()->add('error', $this->translator->__('Your request to register with this site is still waiting for approval from a site administrator.'));
90+
$this->session->getFlashBag()->add('error', $this->translator->__('Login Denied: Your request to register with this site is pending or awaiting verification.'));
9191

9292
return false;
9393
default:
94-
$this->session->getFlashBag()->add('error', $this->translator->__('Nope'));
94+
$this->session->getFlashBag()->add('error', $this->translator->__('Login Denied!'));
9595

9696
return false;
9797
}

src/system/UsersModule/Listener/RegistrationEventsListener.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public function __construct(SessionInterface $session, MailHelper $mailHelper)
5454
public function sendRegistrationEmail(GenericEvent $event)
5555
{
5656
$userEntity = $event->getSubject();
57-
if ($userEntity->getActivated() == UsersConstant::ACTIVATED_PENDING_REG) {
58-
$notificationErrors = $this->mailHelper->createAndSendRegistrationMail($userEntity);
59-
} else {
57+
if ($userEntity->getActivated() != UsersConstant::ACTIVATED_PENDING_REG) {
6058
$notificationErrors = $this->mailHelper->createAndSendUserMail($userEntity);
6159
}
6260
if (!empty($notificationErrors)) {

src/system/UsersModule/Resources/views/Email/welcome.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
{% if createdpassword is not empty %}<p>{{ __('(This is the only time you will receive your password. Please keep it in a safe place.)') }}</p>{% endif %}
1616

17-
{% if not reginfo.isApproved %}
17+
{% if not reginfo.approved %}
1818
<p>{{ __('Thank you for your application for a new account. Your application has been forwarded to the site administrator for review. Please expect a message once the review process is complete.') }}</p>
1919
{% elseif not createdByAdmin %}
2020
<p>{{ __('Your account application has been approved. Thank you for your patience during the new account application review process.') }}</p>
2121
{% elseif createdByAdmin %}
2222
<p>{{ __('The web site administrator has created this new account for you.') }}</p>
2323
{% endif %}
2424

25-
{% if reginfo.isApproved %}
25+
{% if reginfo.approved %}
2626
<p>{{ __('You may now log into the web site.') }}</p>
2727
{% endif %}

src/system/UsersModule/Resources/views/Email/welcome.txt.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
{% if createdpassword is not empty %}{{ __('(This is the only time you will receive your password. Please keep it in a safe place.)') }}{% endif %}
1414

15-
{% if not reginfo.isApproved %}
15+
{% if not reginfo.approved %}
1616
{{ __('Thank you for your application for a new account. Your application has been forwarded to the site administrator for review. Please expect a message once the review process is complete.') }}
1717
{% elseif not createdByAdmin %}
1818
{{ __('Your account application has been approved. Thank you for your patience during the new account application review process.') }}
1919
{% elseif createdByAdmin %}
2020
{{ __('The web site administrator has created this new account for you.') }}
2121
{% endif %}
2222

23-
{% if reginfo.isApproved %}
23+
{% if reginfo.approved %}
2424
{{ __('You may now log into the web site.') }}
2525
{% endif %}

0 commit comments

Comments
 (0)