? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
8 May 2020

Pull Request for Issue #28984 .

Summary of Changes

pass the 4th param type as a string

Testing Instructions

  • Enable users registration (Back-end > Users > Options > Allow User Registration: yes)
  • Go to frontend and create a new user but do not open the mail to confirm the new account
  • Return to back-end and go to Users panel.
  • Try to Activate the new user

or try block / unblock an already registered user

Expected result

able to activate , block / unblock a user from backend without errors

Actual result

Error
Argument 4 passed to PlgUserToken::onUserAfterSave() must be of the type string, null given,

avatar alikon alikon - open - 8 May 2020
avatar alikon alikon - change - 8 May 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2020
Category Administration com_users
avatar alikon alikon - change - 8 May 2020
Title
pass the 4th param as a string
[4.0][com_users] - fix param type onUserAfterSave
avatar alikon alikon - edited - 8 May 2020
avatar alikon alikon - change - 8 May 2020
The description was changed
avatar alikon alikon - edited - 8 May 2020
avatar SharkyKZ
SharkyKZ - comment - 8 May 2020

Existing plugin events are not safe to typehint. @wilsonge will have to decide if we really want to do this at this point.

avatar ceford ceford - test_item - 8 May 2020 - Tested successfully
avatar ceford
ceford - comment - 8 May 2020

I have tested this item successfully on a41bfaf

The user is activated with no error message. I noticed that without the patch the User is activated despite the error message. The list shows Enabled but the drop-down uses Block/Unblock - is that a terminology problem.


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

avatar wilsonge
wilsonge - comment - 8 May 2020

I don't mind us trying. But we have to be careful. In this case to me an error probably should be null if there hasn't been an error. So changing the typehint to ?string $error in the plugin makes more sense to me than this

avatar alikon alikon - change - 9 May 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 May 2020
Category Administration com_users Administration com_users Front End Plugins
avatar alikon
alikon - comment - 9 May 2020

i hope i've correctly understood ...please re-check and re-test carefully

avatar Razzo1987 Razzo1987 - test_item - 16 May 2020 - Tested successfully
avatar Razzo1987
Razzo1987 - comment - 16 May 2020

I have tested this item successfully on b212666

Works!
User activated without errors


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

avatar adj9 adj9 - test_item - 16 May 2020 - Tested successfully
avatar adj9
adj9 - comment - 16 May 2020

I have tested this item successfully on b212666

With PR apply I've not the error.


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

avatar alikon alikon - change - 16 May 2020
Status Pending Ready to Commit
avatar alikon
alikon - comment - 16 May 2020

RTC


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

avatar wilsonge wilsonge - change - 17 May 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-05-17 23:01:51
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 17 May 2020
avatar wilsonge wilsonge - merge - 17 May 2020
avatar wilsonge
wilsonge - comment - 17 May 2020

Thanks!

Add a Comment

Login with GitHub to post a comment