Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.6' into 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Banin committed Jul 10, 2015
2 parents 834e73d + e944817 commit ec06466
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function testForgotPassword()
$this->waitPageToLoad();
$this->waitForAjax();
$messageActual = $this->byXPath("//*[@id='top-page']//div[contains(@class,'alert-error')]")->text();
$messageExpect = "The username or email address \"123test123\" does not exist.";
$messageExpect = "There is no active user with username or email address \"123test123\".";
$this->assertEquals($messageExpect, $messageActual);

$this->byId('prependedInput')->value('[email protected]');
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/UserBundle/Controller/ResetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function sendEmailAction()
$username = $this->getRequest()->request->get('username');
$user = $this->get('oro_user.manager')->findUserByUsernameOrEmail($username);

if (null === $user) {
if (null === $user || !$user->isEnabled()) {
return $this->render('OroUserBundle:Reset:request.html.twig', array('invalid_username' => $username));
}

Expand Down
5 changes: 4 additions & 1 deletion src/Oro/Bundle/UserBundle/Resources/public/js/init-signin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* jshint browser:true */
/* global require */
/**
* @deprecated since 1.8 because of vulnerability for "phishing" attack
*/
require(['jquery'],
function($) {
'use strict';
Expand All @@ -21,4 +24,4 @@ function($) {
$('input[name="_target_path"]').val(hashUrl);
}
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Login page: Login page
"Business Unit": "Business Unit"
"User": "User"
"None": "None"
"There is no active user with username or email address \"%username%\".": "There is no active user with username or email address \"%username%\"."
"Username or Email": "Username or Email"
"Return to Login": "Return to Login"
"Request": "Request"

change_password:
flash:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<fieldset class="oro-forgot-password">
{% if invalid_username is defined %}
<div class="alert alert-error">
{{ 'The username or email address "%username%" does not exist.'|trans({ '%username%': invalid_username }) }}
{{ 'There is no active user with username or email address "%username%".'|trans({ '%username%': invalid_username }) }}
</div>
{% endif %}
{{ messagesContent }}
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/UserBundle/Resources/views/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{% include 'OroRequireJSBundle::scripts.html.twig' with {compressed: not app.debug} %}
<script type="text/javascript">
require(['jquery', 'oroui/js/init-layout', 'orouser/js/init-signin'],
require(['jquery', 'oroui/js/init-layout'],
function($) {
$(function() {
// emulates 'document ready state' for selenium tests
Expand Down

0 comments on commit ec06466

Please sign in to comment.