Skip to content

Commit 1f712b3

Browse files
Merge pull request #43 from techjoomla/j4x
J4X related bug fixes
2 parents 7f3ed9b + b6fcbfa commit 1f712b3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/users.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<extension version="3.0.0" type="plugin" group="api" method="upgrade">
33
<name>PLG_API_USERS</name>
4-
<version>3.0.0</version>
5-
<creationDate>22nd Sep 2022</creationDate>
4+
<version>3.0.1</version>
5+
<creationDate>12th Oct 2022</creationDate>
66
<author>Techjoomla</author>
77
<authorEmail>extensions@techjoomla.com</authorEmail>
88
<authorUrl>www.techjoomla.com</authorUrl>

src/users/login.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public function keygen()
7171
$app = Factory::getApplication();
7272
$username = $app->input->get('username', 0, 'STRING');
7373

74-
$user = Factory::getUser();
7574
$id = UserHelper::getUserId($username);
75+
$user = Factory::getUser($id);
7676

7777
if ($username)
7878
{
@@ -138,8 +138,7 @@ public function keygen()
138138
// Load api key table
139139
Table::addIncludePath(JPATH_ROOT . '/administrator/components/com_api/tables');
140140
$table = Table::getInstance('Key', 'ApiTable');
141-
$table->load(array('userid' => $user->id));
142-
141+
$table->load(array('userid' => $userId));
143142
$key = $table->hash;
144143

145144
// Add new key in easysocial table

0 commit comments

Comments
 (0)