Skip to content

Commit 30b988b

Browse files
committed
FIXES AND IMPROVEMENTS
Fixed password reset error double hashing when password is reset causes incorrect passwords. Also added drop table if exists to avoid installation errors
1 parent d52a0f1 commit 30b988b

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/Darryldecode/Backend/Base/Registrar/Registrar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Registrar {
1313
/**
1414
* the laravel backend version
1515
*/
16-
const VERSION = '1.0.25';
16+
const VERSION = '1.0.26';
1717
const VERSION_NAME = 'Alpha';
1818

1919
/**

src/Darryldecode/Backend/Components/Auth/Controllers/PasswordController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function getReset($token = null)
7878

7979
if (view()->exists('backend.auth.reset'))
8080
{
81-
return view('backend.auth.reset');
81+
return view('backend.auth.reset')->with('token', $token);
8282
}
8383

8484
return view('authManager::reset')->with('token', $token);
@@ -126,7 +126,7 @@ public function postReset(Request $request)
126126
*/
127127
protected function resetPassword($user, $password)
128128
{
129-
$user->password = bcrypt($password);
129+
$user->password = $password; // no need to bcrypt here as passwords are automatically hashed in User Model
130130

131131
$user->save();
132132

src/Darryldecode/Backend/Database/Migrations/2014_10_12_000000_create_users_table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class CreateUsersTable extends Migration {
1212
*/
1313
public function up()
1414
{
15+
Schema::dropIfExists('users');
1516
Schema::create('users', function(Blueprint $table)
1617
{
1718
$table->increments('id');

src/Darryldecode/Backend/Database/Migrations/2014_10_12_400000_create_password_resets_table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class CreatePasswordResetsTable extends Migration {
1212
*/
1313
public function up()
1414
{
15+
Schema::dropIfExists('password_resets');
1516
Schema::create('password_resets', function(Blueprint $table)
1617
{
1718
$table->string('email')->index();

0 commit comments

Comments
 (0)