2021-03-08 12:01:01 +00:00
|
|
|
<?php
|
|
|
|
require "../../../bootstrap.php";
|
|
|
|
|
|
|
|
use Backend\Models\Group;
|
|
|
|
use Backend\Models\Password;
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
if(isset($_SESSION['Admin'])){
|
|
|
|
if(isset($_POST['RestPassword'])){
|
|
|
|
$group = Group::find($_POST['groupId']);
|
|
|
|
if($group){
|
2021-03-09 09:45:05 +00:00
|
|
|
$group->password->password = password_hash($_POST['NewPassword'], PASSWORD_DEFAULT);
|
|
|
|
if($group->save()){
|
|
|
|
|
|
|
|
}
|
2021-03-08 12:01:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|