Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Merge d00818d into 0c49ab0
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum committed Apr 21, 2015
2 parents 0c49ab0 + d00818d commit fa54234
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0

allow_failures:
- php: 7.0

before_script:
- composer install --dev
- cp phpunit.xml.dist phpunit.xml

script:
- phpunit Test/TestCase/AllUserToolsTest.php
- phpunit

notifications:
email: false
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"require": {
"php": ">=5.4.16",
"cakephp/plugin-installer": "*",
"cakephp/cakephp": "~3.0.0"
"cakephp/cakephp": "~3.0.2"
},
"require-dev": {
"phpunit/phpunit": "*"
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/UserBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ public function removeExpiredRegistrations($conditions = []) {
public function changePassword(Entity $entity) {
$validator = $this->_table->validator('default');
$validator->provider('userTable', $this->_table);
$validator->add('old_password', 'notEmpty', [
'rule' => 'notEmpty',
$validator->add('old_password', 'notBlank', [
'rule' => 'notBlank',
'message' => __d('userTools', 'Enter your old password.')
]);
$validator->add('old_password', 'oldPassword', [
Expand Down
4 changes: 2 additions & 2 deletions src/Validation/UsersValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function __construct() {
*/
public function validateUserName() {
$this->add('username', [
'notEmpty' => [
'rule' => 'notEmpty',
'notBlank' => [
'rule' => 'notBlank',
'message' => __d('user_tools', 'An username is required.')
],
'length' => [
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/AuthHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function isMe($userId, $field = 'id') {
* @return mixed
*/
public function user($key) {
return $this->_userData->{$key};
return $this->_userData[$key];
}

/**
Expand Down

0 comments on commit fa54234

Please sign in to comment.