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
+5 -4
View File
@@ -1,15 +1,16 @@
<?php
require "../../../bootstrap.php";
require_once "../../../bootstrap.php";
require_once "Admin.php";
use Backend\Models\Group;
use Backend\Models\Password;
session_start();
if(isset($_SESSION['Admin'])){
if(isset($_POST['RestPassword'])){
if(isAdmin()){
if(isset($_POST['restPassword'])){
$group = Group::find($_POST['groupId']);
if($group){
$group->password->password = password_hash($_POST['NewPassword'], PASSWORD_DEFAULT);
$group->password->password = password_hash($_POST['newPassword'], PASSWORD_DEFAULT);
if($group->save()){
}