Skip to content

Conversation

@manojLondhe
Copy link
Member

@manojLondhe manojLondhe commented Apr 19, 2019

@manojLondhe manojLondhe changed the title Issue #15 fix: User update (patch) is not working for resource com_api&app=users&resource=user Issue #15 fix: User update (patch) is not working for resource app=users&resource=user Apr 19, 2019
{
if ($fidentifier)
// Forced user creation
if ($fIdentifier)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combine this with the else above into an elseif condition ?


// Get current logged in user.
$my = JFactory::getUser();
$me = JFactory::getUser();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user object is already available in $this->plugin->get('user') can you confirm it is ok to use either ?

{
if ($formData['password'] == '')
// Validate required fields
if ($formData['username'] == '' || $formData['name'] == '' || $formData['email'] == '' || $formData['password'] == '')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can create user without passing the password in joomla.
@manojLondhe

// Forced user creation
if ($fIdentifier)
{
$user = new JUser;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If id is provided, and is exist then user should get updated
@manojLondhe @coolbung

vaivk369 pushed a commit to vaivk369/com_api.plugins.users that referenced this pull request May 9, 2019
@manojLondhe
Copy link
Member Author

closing in favor of #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants