18 lines
412 B
PHP
18 lines
412 B
PHP
<?php
|
|
require_once "../../../bootstrap.php";
|
|
require_once "../Admin/Admin.php";
|
|
|
|
use Backend\Models\Group;
|
|
|
|
//session_start();
|
|
if(isAdmin()){
|
|
if(isset($_POST['restPassword'])){
|
|
$group = Group::find($_POST['groupId']);
|
|
if($group){
|
|
$group->password->password = password_hash($_POST['newPassword'], PASSWORD_DEFAULT);
|
|
if($group->save()){
|
|
|
|
}
|
|
}
|
|
}
|
|
} |