all controllers is aok

This commit is contained in:
2021-03-12 14:05:31 +01:00
parent c6e002d464
commit 91e4d3df00
10 changed files with 68 additions and 43 deletions
+3 -3
View File
@@ -3,11 +3,11 @@ require_once "../../../bootstrap.php";
require_once "Group.php";
use Backend\Models\Password;
if(isset($_SESSION['token'])){
if(isLogin()){
if(isset($_POST['updatePassword']))
$password = Password::firstWhere("group_id", groupViaToken($_SESSION["token"])->id);
if(passwordValidate($pass = $_POST['password1'], $_POST['password2'])){
$password = password_hash($pass,PASSWORD_DEFAULT);
if(passwordValidate($pass = $_POST['password'])){
$password->password = password_hash($pass,PASSWORD_DEFAULT);
$password->save();
}