View Issue Details

IDProjectCategoryView StatusLast Update
16449Bug reportsOtherpublic2021-03-08 12:29
ReporterNickko Assigned Togabrieljenik  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version4.3.2 
Summary16449: Error with CLI password reset
DescriptionI loose my password, I tryed to rest it by CLI with the command here: https://manual.limesurvey.org/General_FAQ#I_forgot_my_admin_password._How_do_I_reset_it.3F

php application/commands/starter.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS
or
php application/commands/console.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS
Steps To ReproduceConnect to your serveur with SSH.
Go to the Limsurvey's folder
Type :
php application/commands/starter.php resetpassword NEW_ADMIN_NAME NEW_ADMIN_PASS
(replace new admin and new password with correct values).

I get this error:
Error: Call to undefined function gT() in /home/usabilit/limesurvey/application/models/User.php:107
Stack trace:
#0 /home/usabilit/limesurvey/framework/db/ar/CActiveRecord.php(604): User->attributeLabels()
#1 /home/usabilit/limesurvey/framework/validators/CValidator.php(250): CActiveRecord->getAttributeLabel('htmleditormode')
#2 /home/usabilit/limesurvey/framework/validators/CRangeValidator.php(84): CValidator->addError(Object(User), 'htmleditormode', '{attribute} is ...')
#3 /home/usabilit/limesurvey/framework/validators/CValidator.php(201): CRangeValidator->validateAttribute(Object(User), 'htmleditormode')
#4 /home/usabilit/limesurvey/framework/base/CModel.php(159): CValidator->validate(Object(User), Array)
#5 /home/usabilit/limesurvey/framework/db/ar/CActiveRecord.php(810): CModel->validate(NULL)
#6 /home/usabilit/limesurvey/application/commands/ResetPasswordCommand.php(24): CActiveRecord->save()
#7 /home/usabilit/limesurvey/framework/console/CConsoleCommandRunner.php(71): ResetPasswordCommand->run(Array)
#8 /home/usabilit/limesurvey/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#9 /home/usabilit/limesurvey/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#10 /home/usabilit/limesurvey/application/commands/console.php(64): CApplication->run()
#11 {main}
TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 4.3.2+200629
I will donate to the project if issue is resolvedNo
BrowserEdge (previous Chromium) and Vivaldi (use chromium).
Database & DB-VersionMy SQL / version 426
Server OS (if known)OVH Shared hosting
Webserver software & version (if known)Apache unknown version
PHP Version5.3

Activities

gabrieljenik

gabrieljenik

2021-02-25 13:49

manager   ~62513

Save the model validating only the password, because there may be issues with other attributes (like an invalid value for some setting), which the user cannot fix because he doesn't have access.

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1781
gabrieljenik

gabrieljenik

2021-02-25 18:26

manager   ~62527

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31201
lime_release_bot

lime_release_bot

2021-03-08 12:29

administrator   ~62891

Fixed in Release 4.4.11+210301

Related Changesets

LimeSurvey: master 55d787e0

2021-02-25 18:26:04

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16449: Error with CLI password reset (#1781)

Save the model validating only the password, because there may be issues with other attributes (like an invalid value for some setting), which the user cannot fix because he doesn't have access.
Affected Issues
16449
mod - application/commands/ResetPasswordCommand.php Diff File

Issue History

Date Modified Username Field Change
2020-07-02 15:47 Nickko New Issue
2020-07-08 18:51 DenisChenu Category _ Unknown => Other
2020-12-28 15:31 cdorin Priority none => low
2020-12-28 15:31 cdorin Status new => confirmed
2021-02-25 13:49 gabrieljenik Note Added: 62513
2021-02-25 18:26 gabrieljenik Changeset attached => LimeSurvey master 55d787e0
2021-02-25 18:26 gabrieljenik Note Added: 62527
2021-02-25 18:26 gabrieljenik Assigned To => gabrieljenik
2021-02-25 18:26 gabrieljenik Resolution open => fixed
2021-03-08 12:29 lime_release_bot Note Added: 62891
2021-03-08 12:29 lime_release_bot Status confirmed => closed