Commit 6f9687de authored by Chanon.u's avatar Chanon.u
Browse files

Fix issue update password - config manual response

parent 1b307f70
...@@ -43,17 +43,10 @@ class ConfigManualResponse extends Component ...@@ -43,17 +43,10 @@ class ConfigManualResponse extends Component
$userConnectSpn = UsersConnectSpn::where('uid', $this->editUserId)->first(); $userConnectSpn = UsersConnectSpn::where('uid', $this->editUserId)->first();
if($userConnectSpn){ if($userConnectSpn){
if(empty($this->passwordSPN)){ if(!empty($this->passwordSPN)){
$this->dispatchBrowserEvent('open-modal', [ $userConnectSpn->password = password_hash($this->passwordSPN, PASSWORD_BCRYPT);
'name' => 'alert-modal',
'message' => 'Password must not be empty!',
'status' => 'warning'
]);
return;
} }
$userConnectSpn->username = $this->usernameSPN; $userConnectSpn->username = $this->usernameSPN;
$userConnectSpn->password = password_hash($this->passwordSPN, PASSWORD_BCRYPT);
$userConnectSpn->link = $this->linkSPN; $userConnectSpn->link = $this->linkSPN;
$userConnectSpn->save(); $userConnectSpn->save();
}else{ }else{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment