? Success

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
26 Oct 2015

This allows the creation of users via CLI scripts that currently error because the application object is an instance of JApplicationCli and the isAdmin method doesn't exist.

You can test by ensuring that creating a user in the frontend and backend of Joomla work as expected. If you want to have bonus brownie points you can create your own CLI script that will now create users succesfully

avatar wilsonge wilsonge - open - 26 Oct 2015
avatar wilsonge wilsonge - change - 26 Oct 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2015
Labels Added: ?
avatar mbabker
mbabker - comment - 26 Oct 2015

The only negative thing to this is it disables the ability to send e-mails to the new users when creating the accounts via CLI. Then again, everything inside this if statement assumes a JApplicationCms object is in use (i.e. getting the configuration data). There's no good answer here; you either hardcode a block for a feature or you start refactoring to make the code work on CLI correctly or impose new requirements on CLI apps (which BTW could be partially addressed with my command runner PR).

avatar wilsonge
wilsonge - comment - 26 Oct 2015

I mean the configuration you can actually deal with if you custom code things

$instance = JApplicationCli::getInstance('MyScript');
$instance->loadConfiguration(JFactory::getConfig());
JFactory::$application = $instance;
$instance->execute();

Actually what fails is 'enqueueMessage' :p

avatar wilsonge
wilsonge - comment - 26 Oct 2015

Actually the command runner still should be running the afterSave plugin event so unless I'm missing something this is still an issue for it?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8166.

avatar mbabker
mbabker - comment - 26 Oct 2015

It helps with defining a standard interface, something we're lacking for the CMS application class because we basically assume everywhere in the code that apps will always be a web application based on our CMS application class.

avatar zero-24 zero-24 - change - 27 Oct 2015
Category Libraries
avatar zero-24 zero-24 - change - 27 Oct 2015
Easy No Yes
avatar zero-24 zero-24 - change - 27 Oct 2015
Category Libraries Plugins
avatar roland-d
roland-d - comment - 24 Jun 2016

@wilsonge Can you give an update on this PR?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8166.

avatar brianteeman brianteeman - change - 24 Jun 2016
Status Pending Information Required
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jul 2016
Category Plugins Plugins Front End
avatar wilsonge
wilsonge - comment - 31 Jul 2016

After talking with @roland-d I've changed this to a method exists check in case someone has added a isAdmin method to a JApplicationCli class..... yes i hate myself too

avatar brianteeman brianteeman - change - 28 Oct 2016
Status Information Required Pending
avatar sanderpotjer sanderpotjer - test_item - 4 Nov 2016 - Tested successfully
avatar sanderpotjer
sanderpotjer - comment - 4 Nov 2016

I have tested this item successfully on e4fd332

After applying the patch creating users in the frontend and backend is still working.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8166.

avatar coolcat-creations
coolcat-creations - comment - 6 Dec 2016

I have tested this item successfully on e4fd332

tested successfully - but without bonus brownie points... no clue how to do that ;)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8166.

avatar coolcat-creations coolcat-creations - test_item - 6 Dec 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 6 Dec 2016
The description was changed
Status Pending Ready to Commit
avatar jeckodevelopment jeckodevelopment - change - 6 Dec 2016
Labels Removed: ?
avatar jeckodevelopment jeckodevelopment - edited - 6 Dec 2016
avatar jeckodevelopment
jeckodevelopment - comment - 6 Dec 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8166.

avatar jeckodevelopment jeckodevelopment - change - 6 Dec 2016
Milestone Added:
avatar rdeutz rdeutz - reference | 9172308 - 9 Dec 16
avatar rdeutz rdeutz - merge - 9 Dec 2016
avatar rdeutz rdeutz - close - 9 Dec 2016
avatar rdeutz rdeutz - change - 9 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-09 22:26:07
Closed_By rdeutz
avatar rdeutz rdeutz - close - 9 Dec 2016
avatar rdeutz rdeutz - merge - 9 Dec 2016
avatar wilsonge wilsonge - head_ref_deleted - 9 Dec 2016
avatar cpfeifer cpfeifer - reference | fb3e6ba - 22 Dec 16

Add a Comment

Login with GitHub to post a comment