password reset, admin upadte and Camel case update

This commit is contained in:
2021-03-11 09:28:30 +01:00
parent 246cfad08a
commit a65e9ceec8
16 changed files with 117 additions and 60 deletions
@@ -0,0 +1,14 @@
<?php
require_once "../../../bootstrap.php";
require_once "Group.php";
use Backend\Models\Password;
if(isset($_SESSION['token'])){
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);
$password->save();
}
}