mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-14 14:48:39 +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
|
* @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);
|
$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(
|
$this->fillJsonResponse(
|
||||||
$request, $response,
|
$request, $response,
|
||||||
$status ? NotificationLevel::OK : NotificationLevel::WARNING,
|
NotificationLevel::OK,
|
||||||
'Profil',
|
'Profile',
|
||||||
'Temp password successfully created.',
|
'Temp password successfully created.',
|
||||||
$account->tempPassword
|
$account->tempPassword
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -51,16 +51,25 @@ final class ProfileMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $ownsOne = [
|
protected static array $ownsOne = [
|
||||||
'account' => [
|
|
||||||
'mapper' => AccountMapper::class,
|
|
||||||
'external' => 'profile_account_account',
|
|
||||||
],
|
|
||||||
'image' => [
|
'image' => [
|
||||||
'mapper' => MediaMapper::class,
|
'mapper' => MediaMapper::class,
|
||||||
'external' => 'profile_account_image',
|
'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.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
data-emptyAfter="true"
|
data-emptyAfter="true"
|
||||||
data-autocomplete="off"
|
data-autocomplete="off"
|
||||||
data-src="api/admin/find/accgrp?search={!#i<?= $this->getId(); ?>}">
|
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">
|
<table class="default">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user