Skip to content

Commit eaa6a42

Browse files
committed
Merge branch 'development' into 'master'
prepare release v 3.2.8 See merge request dadangnh/iam!303
2 parents f43ab8b + 2aea68c commit eaa6a42

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# IAM Changelog
22

3-
## Version 3.2.7 (current stable)
3+
## Version 3.2.8 (current stable)
4+
* Updated Symfony Recipes
5+
* update dependencies
6+
* bug fix in endpoint create user
7+
8+
9+
## Version 3.2.7
410
* Updated Symfony Recipes
511
* update dependencies
612
* bug fix in endpoint change password by sikka

config/packages/api_platform.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
api_platform:
22
title: IAM API Docs
3-
version: 3.2.7
3+
version: 3.2.8
44
description: |
55
Bug report and feature request are welcome, please report [here](https://gitlab.com/dadangnh/iam/-/issues).
66
Newest production version are always available at [https://iam.pajak.or.id/api](https://iam.pajak.or.id/api)

src/Controller/SecurityController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,21 @@ public function createUser(Request $request, UserPasswordHasherInterface $passwo
177177

178178
$newPasswordEncoded = $passwordHasher->hashPassword($user, $password);
179179
$user->setPassword($newPasswordEncoded);
180+
$dateTime = new \DateTime('now', new \DateTimeZone('Asia/Bangkok'));
181+
$formattedDate = $dateTime->format('Y-m-d H:i:s');
180182

181183
$entityManager = $doctrine->getManager();
182184
$entityManager->persist($user);
183185
$entityManager->flush();
184186

187+
// Direct SQL update to set the lastchange field in GMT+7
188+
$this->entityManager->getConnection()->executeStatement(
189+
'UPDATE "user" SET last_change = :lastchange WHERE username = :username',
190+
[
191+
'lastchange' => $formattedDate, // Use the formatted date for lastchange
192+
'username' => $username, // Use the username for the WHERE condition
193+
]
194+
);
185195
// Return ID and username upon successful creation
186196
return $this->json([
187197
'code' => 200,

0 commit comments

Comments
 (0)