mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-01-11 15:28:40 +00:00
many fixes and expands and module expansions
This commit is contained in:
parent
8aa81419c7
commit
d4b30e036f
|
|
@ -102,17 +102,17 @@ final class ApiController extends Controller
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function apiProfileTempLoginCreate(Profile $profile, RequestAbstract $request) : void
|
||||
public function apiProfileTempLoginCreate(Profile $profile, RequestAbstract $request, ResponseAbstract $response) : void
|
||||
{
|
||||
$account = AccountMapper::get($reqeust->header->account);
|
||||
$account = AccountMapper::get($request->header->account);
|
||||
$account->tempPassword = \password_hash(\random_bytes(64), \PASSWORD_DEFAULT);
|
||||
|
||||
$this->updateModel($request->header->account, $old, $profile, AccountMapper::class, 'profile', $request->getOrigin());
|
||||
$this->updateModel($request->header->account, $account, $account, AccountMapper::class, 'profile', $request->getOrigin());
|
||||
|
||||
$this->fillJsonResponse(
|
||||
$request, $response,
|
||||
$status ? NotificationLevel::OK : NotificationLevel::WARNING,
|
||||
'Profil',
|
||||
NotificationLevel::OK,
|
||||
'Profile',
|
||||
'Temp password successfully created.',
|
||||
$account->tempPassword
|
||||
);
|
||||
|
|
|
|||
|
|
@ -51,16 +51,25 @@ final class ProfileMapper extends DataMapperAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $ownsOne = [
|
||||
'account' => [
|
||||
'mapper' => AccountMapper::class,
|
||||
'external' => 'profile_account_account',
|
||||
],
|
||||
'image' => [
|
||||
'mapper' => MediaMapper::class,
|
||||
'external' => 'profile_account_image',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Belongs to.
|
||||
*
|
||||
* @var array<string, array{mapper:string, external:string}>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static array $belongsTo = [
|
||||
'account' => [
|
||||
'mapper' => AccountMapper::class,
|
||||
'external' => 'profile_account_account',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Has many relation.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
data-emptyAfter="true"
|
||||
data-autocomplete="off"
|
||||
data-src="api/admin/find/accgrp?search={!#i<?= $this->getId(); ?>}">
|
||||
<div id="<?= $this->getId(); ?>-dropdown" class="dropdown" data-active="true">
|
||||
<div id="<?= $this->getId(); ?>-popup" class="popup" data-active="true">
|
||||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user