Saner way of password change check

This commit is contained in:
Nabeel Shahzad
2017-12-06 10:07:10 -06:00
parent 46b86cf3a6
commit ac0f163090
2 changed files with 56 additions and 57 deletions
@@ -143,7 +143,7 @@ class UserController extends BaseController
} }
$req_data = $request->all(); $req_data = $request->all();
if($req_data['password'] == '') { if(!$request->filled('password')) {
unset($req_data['password']); unset($req_data['password']);
} else { } else {
$req_data['password'] = Hash::make($req_data['password']); $req_data['password'] = Hash::make($req_data['password']);
Generated
+55 -56
View File
@@ -50,7 +50,7 @@
"anlutro\\LaravelSettings\\": "src/" "anlutro\\LaravelSettings\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -92,7 +92,7 @@
"Chrisbjr\\ApiGuard\\": "src" "Chrisbjr\\ApiGuard\\": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"authors": [ "authors": [
{ {
"name": "Chris Bautista", "name": "Chris Bautista",
@@ -536,7 +536,7 @@
"Doctrine\\DBAL\\": "lib/" "Doctrine\\DBAL\\": "lib/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -859,7 +859,7 @@
"Egulias\\EmailValidator\\": "EmailValidator" "Egulias\\EmailValidator\\": "EmailValidator"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -966,7 +966,7 @@
"Parsedown": "" "Parsedown": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -1020,7 +1020,7 @@
"Hashids\\": "src/" "Hashids\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -1127,7 +1127,7 @@
"InfyOm\\AdminLTETemplates\\": "src/" "InfyOm\\AdminLTETemplates\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -1146,7 +1146,7 @@
"laravel", "laravel",
"templates" "templates"
], ],
"time": "2017-11-25T04:43:54+00:00" "time": "2017-11-25 04:43:54"
}, },
{ {
"name": "infyomlabs/laravel-generator", "name": "infyomlabs/laravel-generator",
@@ -1188,7 +1188,7 @@
"src/helpers.php" "src/helpers.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -1212,7 +1212,7 @@
"test", "test",
"view" "view"
], ],
"time": "2017-11-25T05:18:22+00:00" "time": "2017-11-25 05:18:22"
}, },
{ {
"name": "jeremeamia/SuperClosure", "name": "jeremeamia/SuperClosure",
@@ -1441,7 +1441,7 @@
"Illuminate\\": "src/Illuminate/" "Illuminate\\": "src/Illuminate/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -1864,7 +1864,7 @@
} }
], ],
"description": "Bloom filter implementation", "description": "Bloom filter implementation",
"time": "2017-11-30T17:51:14+00:00" "time": "2017-11-30 17:51:14"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
@@ -1970,7 +1970,7 @@
"Cron\\": "src/Cron/" "Cron\\": "src/Cron/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -2019,7 +2019,7 @@
"src/DeepCopy/deep_copy.php" "src/DeepCopy/deep_copy.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -2066,7 +2066,7 @@
"src/Helpers/functions.php" "src/Helpers/functions.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -2081,7 +2081,7 @@
} }
], ],
"description": "Laravel web installer", "description": "Laravel web installer",
"time": "2017-12-04T19:05:57+00:00" "time": "2017-12-04 19:05:57"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
@@ -2171,7 +2171,7 @@
"PhpParser\\": "lib/PhpParser" "PhpParser\\": "lib/PhpParser"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@@ -2604,7 +2604,7 @@
] ]
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -2757,7 +2757,7 @@
"Prophecy\\": "src/" "Prophecy\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -2786,16 +2786,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "5.2.4", "version": "5.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "033ec97498cf530cc1be4199264cad568b19be26" "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/033ec97498cf530cc1be4199264cad568b19be26", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
"reference": "033ec97498cf530cc1be4199264cad568b19be26", "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2811,7 +2811,6 @@
"theseer/tokenizer": "^1.1" "theseer/tokenizer": "^1.1"
}, },
"require-dev": { "require-dev": {
"ext-xdebug": "^2.5",
"phpunit/phpunit": "^6.0" "phpunit/phpunit": "^6.0"
}, },
"suggest": { "suggest": {
@@ -2820,7 +2819,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "5.2.x-dev" "dev-master": "5.3.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -2828,14 +2827,14 @@
"src/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [ "authors": [
{ {
"name": "Sebastian Bergmann", "name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de", "email": "sebastian@phpunit.de",
"role": "lead" "role": "lead"
} }
], ],
@@ -2846,7 +2845,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-11-27T09:00:30+00:00" "time": "2017-12-06T09:29:45+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@@ -2876,7 +2875,7 @@
"src/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@@ -3017,7 +3016,7 @@
"src/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@@ -3098,7 +3097,7 @@
"src/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@@ -3221,7 +3220,7 @@
"Prettus\\Repository\\": "src/Prettus/Repository/" "Prettus\\Repository\\": "src/Prettus/Repository/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -3824,7 +3823,7 @@
"src/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@@ -4399,7 +4398,7 @@
"src/helpers.php" "src/helpers.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -4582,7 +4581,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -4691,7 +4690,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -4859,7 +4858,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -4913,7 +4912,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5001,7 +5000,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5202,7 +5201,7 @@
"bootstrap.php" "bootstrap.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5259,7 +5258,7 @@
"bootstrap.php" "bootstrap.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5318,7 +5317,7 @@
"Resources/stubs" "Resources/stubs"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5370,7 +5369,7 @@
"Symfony\\Polyfill\\Util\\": "" "Symfony\\Polyfill\\Util\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5425,7 +5424,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5482,7 +5481,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5565,7 +5564,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5649,7 +5648,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5717,7 +5716,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5782,7 +5781,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -5975,7 +5974,7 @@
"Tivie\\OS\\": "src/" "Tivie\\OS\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"APACHE 2.0" "APACHE 2.0"
], ],
@@ -6196,7 +6195,7 @@
"Webpatser\\Uuid": "src/" "Webpatser\\Uuid": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -6325,7 +6324,7 @@
"src/helper.php" "src/helper.php"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -6382,7 +6381,7 @@
"Zend\\Diactoros\\": "src/" "Zend\\Diactoros\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"BSD-2-Clause" "BSD-2-Clause"
], ],
@@ -6461,7 +6460,7 @@
"permission", "permission",
"roles" "roles"
], ],
"time": "2016-12-29T06:25:06+00:00" "time": "2016-12-29 06:25:06"
} }
], ],
"packages-dev": [ "packages-dev": [
@@ -6676,7 +6675,7 @@
"Whoops\\": "src/Whoops/" "Whoops\\": "src/Whoops/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
@@ -7068,7 +7067,7 @@
"/Tests/" "/Tests/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "http://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],