Skip to content

Commit de84422

Browse files
committed
Updated password edit conditions
Just in case.
1 parent b018567 commit de84422

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Tricks/Repositories/Eloquent/UserRepository.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ protected function usernameIsAllowed($username)
149149
public function updateSettings(User $user, array $data)
150150
{
151151
$user->username = $data['username'];
152-
$user->password = ($data['password'] != '') ? Hash::make($data['password']) : $user->password;
152+
if ($data['password'] != '') {
153+
$user->password = Hash::make($data['password']);
154+
}
153155

154156
if ($data['avatar'] != '') {
155157
File::move(public_path().'/img/avatar/temp/'.$data['avatar'], 'img/avatar/'.$data['avatar']);

0 commit comments

Comments
 (0)