18 lines
415 B
PHP
18 lines
415 B
PHP
<?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){
|
|
$group->password->password = password_hash($_POST['NewPassword'], PASSWORD_DEFAULT);
|
|
if($group->save()){
|
|
|
|
}
|
|
}
|
|
}
|
|
} |