diff --git a/app/Services/Admin/AdminService.php b/app/Services/Admin/AdminService.php index 7a74993..36806b8 100644 --- a/app/Services/Admin/AdminService.php +++ b/app/Services/Admin/AdminService.php @@ -68,7 +68,7 @@ class AdminService implements AdminServiceInterface 'msnv' => $data['msnv'], 'name' => $data['name'], 'mail' => $data['mail'], - 'pass' => Hash::make($data['password']), + 'pass' => md5($data['password']), 'departments' => $data['departments'], 'role' => $data['role'], 'status' => User::STATUS_ACTIVE, diff --git a/app/Services/User/UserService.php b/app/Services/User/UserService.php index 63284aa..47eacd2 100644 --- a/app/Services/User/UserService.php +++ b/app/Services/User/UserService.php @@ -90,7 +90,7 @@ class UserService implements UserServiceInterface public function updatePassword(User $user, string $newPassword): void { - $user->pass = Hash::make($newPassword); + $user->pass = md5($newPassword); $user->first_login = User::FIRST_LOGIN_FALSE; $user->save(); } diff --git a/resources/views/user/dashboard.blade.php b/resources/views/user/dashboard.blade.php index cf4354c..9a91a6f 100644 --- a/resources/views/user/dashboard.blade.php +++ b/resources/views/user/dashboard.blade.php @@ -4,8 +4,7 @@ @section('content')
- - +

Hey {{ Auth::check() ? (Auth::user()->name ?? 'Minh Anh') : 'Minh Anh' }}! 👋 @@ -13,16 +12,14 @@

Cảm ơn bạn đã góp phần tạo nên một tập thể tuyệt vời!

-
-
- @@ -30,9 +27,9 @@ - @@ -41,9 +38,9 @@ - @@ -52,66 +49,59 @@
- -
- - -
- - +
+ +
+

Thanks gần đây

Xem tất cả
- +
- - - - - + + + + + +
+
+ +
+
-
- - -
- -
- - -
- - + +
+

Bảng xếp hạng

Xem tất cả
- - +
-
- +
- +
-
diff --git a/tests/Feature/AdminUserListStatsTest.php b/tests/Feature/AdminUserListStatsTest.php index 7ff1899..72c1d91 100644 --- a/tests/Feature/AdminUserListStatsTest.php +++ b/tests/Feature/AdminUserListStatsTest.php @@ -28,7 +28,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 1001, 'name' => 'User A', 'mail' => 'usera@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -40,7 +41,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 1002, 'name' => 'User B', 'mail' => 'userb@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -106,7 +108,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 1001, 'name' => 'User A', 'mail' => 'usera@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -162,7 +165,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 2001, 'name' => 'DEV ALPHA', 'mail' => 'alpha@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -174,7 +178,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 2002, 'name' => 'DEV BETA', 'mail' => 'beta@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -204,7 +209,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 3001, 'name' => 'DEV ENABLED', 'mail' => 'enabled@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10, @@ -216,7 +222,8 @@ class AdminUserListStatsTest extends TestCase 'msnv' => 3002, 'name' => 'DEV DISABLED', 'mail' => 'disabled@example.com', - 'pass' => bcrypt('password'), + 'pass' => md5('password'), + 'departments' => 1, 'role' => User::ROLE_MEMBER, 'status' => User::STATUS_ACTIVE, 'card' => 10,