View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
13200Bug reportsAuthenticationpublic2018-01-30 14:57
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityfeature 
Status closedResolutionfixed 
Fixed in Version3.0.x 
Summary13200: LDAP Auth plugin user autocreate broken
Description

When you use Auth LDAP with auto user creation : user must log to times to login.
1st time : user is created
2nd time : user can log in

Additional Information

Finally founf the issue

  1. Current event is
  2. User don't exist in DB then
  3. User is created
  4. Current event are updated

Here the event by order
User exist events
'beforeLogin' (Plugin event is a new LSUserIdentity)
'afterLoginFormSubmit' (current LSUserIdentity)
'newUserSession' (current LSUserIdentity)
'newUserLogin' (current LSUserIdentity)
'beforeHasPermission' (another )
'beforeFailedLoginAttemptDeleteMany'
'beforeModelDeleteMany'
'afterSuccessfulLogin'
'beforeControllerAction'
'afterPluginLoad'

User don't exist events
'beforeLogin' (Plugin event is a new LSUserIdentity)
'afterLoginFormSubmit' (current LSUserIdentity)
'newUserSession' (current LSUserIdentity)
'beforeHasPermission' (another )
'beforeHasPermission' (…)
'beforeUserSave' (…)
'beforeModelSave' (…)
'afterUserSave' (…)
'afterModelSave' (…)
'beforePermissionSave' (…)
'beforeModelSave' (…)
'afterPermissionSave' (…)
'afterModelSave' (…)
'beforePermissionSave' (…)
'beforeModelSave' (…)
'afterPermissionSave' (…)
'afterModelSave' (…)
'newUserLogin' (no LSUserIdentity set (is null))
'beforeFailedLoginAttemptSave' (then broke)

I don't see a good way to remove all …Save event

The good solution can be :
Create a new function in LSUserIdentity
LSUserIdentity->createUser($aData,$aPermission)
return $this (current LSUserIdentity

And then maybe we can use current USserIdentity return to reset the event ? (unsure)

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2018-01-17 18:58

developer   ~45877

Auto user creation work in 2.73.0

DenisChenu

DenisChenu

2018-01-18 13:56

developer   ~45891

Currently : still have specific plugin part in Core : in controllers/admin/useraction.

1st step : remove this related plugin part …

DenisChenu

DenisChenu

2018-01-19 18:06

developer   ~45925

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

DenisChenu

DenisChenu

2018-01-19 18:10

developer   ~45926

One line fix … AWFULL the time i take to find it :(

LouisGac

LouisGac

2018-01-22 11:05

developer   ~45944

sometime the smallest fix are the hardest ones....

c_schmitz

c_schmitz

2018-01-24 15:50

administrator   ~46010

Version 3.1.0 released

DenisChenu

DenisChenu

2018-01-30 14:57

developer   ~46151

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

Related Changesets

LimeSurvey: master a5a05d59

2018-01-19 18:06:37

DenisChenu

Details Diff
Fixed issue 13200: LDAP Auth plugin user autocreate broken
Dev: just unsubscribe from beforeHasPermission when needed
Dev: i hate to find a one line fix after testing, hacking for hours …
Affected Issues
13200
mod - application/core/plugins/AuthLDAP/AuthLDAP.php Diff File

LimeSurvey: master abef4c6f

2018-01-19 19:01:18

DenisChenu

Details Diff
Merge branch 'master' of https://github.com/LimeSurvey/LimeSurvey.git into master_RC_AuthPlugin
Dev: fix conflict
* 'master' of https://github.com/LimeSurvey/LimeSurvey.git: (84 commits)
Dev: remove deprecated code _GetSessionUserRights Dev: USER_RIGHT_INITIALSUPERADMIN replaced by config Dev: and not used since 2.6lts or before
Fixed issue 13200: LDAP Auth plugin user autocreate broken Dev: just unsubscribe from beforeHasPermission when needed Dev: i hate to find a one line fix after testing, hacking for hours …
Dev: removed special characters from sidemenu
Dev: minimal changes and typo fixing
Dev: translate surveymenuentried
Fixed issue: language error
Fixed issue 13212: missing translation frontend survey
Fixed issue: Emailtemplate reset not working
Fixed issue 13215: Missing string
Fixed issue 13216: missing translation
Updated translation: Catalan by qualitatuvic Updated translation: German by c_schmitz Updated translation: Hungarian by kkd Updated translation: Norwegian (Bokmål) by pmonstad Updated translation: Polish by elissa Updated translation: German (Informal) by c_schmitz Updated translation: Polish (Informal) by elissa
Fixed issue 13193: Unable to update question type (simple selector)
Dev: added a demomode command to not only restore mint status but also install some demo surveys
Fixed issue: Demo rendered unusable with wipe command
New feature 12240: Validation settings for "array by column" question type
Fixed issue 13190 : Remove text or uncheck checkbox automatically not work
Updated translation: Danish by abc99 Updated translation: Georgian by zch5368
Updated translation: German by c_schmitz Updated translation: Hungarian by kkd Updated translation: Japanese by nomoto Updated translation: Norwegian (Bokmål) by pmonstad Updated translation: Romanian by cdorin
Fixed issue: Captcha not showing
Removed translation: Papiamento (Aruba)
...

# Conflicts:
# application/helpers/remotecontrol/remotecontrol_handle.php
Affected Issues
13190, 13193, 13200, 13212, 13215, 13216
add - application/commands/DemomodeCommand.php Diff File
mod - application/commands/WipeCommand.php Diff File
mod - application/commands/console.php Diff File
add - application/config/fonts.php Diff File
mod - application/config/internal.php Diff File
mod - application/config/packages.php Diff File
add - application/config/questiontypes.php Diff File
mod - application/config/third_party.php Diff File
mod - application/config/updater_version.php Diff File
mod - application/config/version.php Diff File
mod - application/controllers/AdminController.php Diff File
mod - application/controllers/SurveyController.php Diff File
mod - application/controllers/admin/PluginHelper.php Diff File
mod - application/controllers/admin/authentication.php Diff File
mod - application/controllers/admin/index.php Diff File
mod - application/controllers/admin/questions.php Diff File
mod - application/controllers/admin/tokens.php Diff File
mod - application/controllers/admin/usergroups.php Diff File
add - application/core/ConsoleHttpSession.php Diff File
add - application/core/LSCaptcha.php Diff File
mod - application/core/LS_Twig_Extension.php Diff File
mod - application/core/LsDefaultDataSets.php Diff File
mod - application/core/plugins/AuthLDAP/AuthLDAP.php Diff File
mod - application/extensions/admin/grid/MassiveActionsWidget/assets/listActions.js Diff File
mod - application/extensions/admin/survey/ListSurveysWidget/assets/reload.js Diff File
mod - application/extensions/captchaExtended/CaptchaExtendedAction.php Diff File
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/frontend_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - application/helpers/questionHelper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - application/helpers/surveytranslator_helper.php Diff File
mod - application/helpers/update/updatedb_helper.php Diff File
mod - application/models/QuestionAttribute.php Diff File
mod - application/models/Survey.php Diff File
mod - application/models/SurveyLanguageSetting.php Diff File
mod - application/models/Surveymenu.php Diff File
mod - application/models/SurveymenuEntries.php Diff File
mod - application/models/Template.php Diff File
mod - application/models/TemplateConfiguration.php Diff File
mod - application/models/TokenDynamic.php Diff File
mod - application/views/admin/emailtemplates/email_language_template_tab.php Diff File
mod - application/views/admin/global_settings/_email.php Diff File
mod - application/views/admin/super/layout_insurvey.php Diff File
mod - application/views/admin/survey/Question/editQuestion_view.php Diff File
mod - application/views/admin/survey/Question/question_subviews/_ajax_variables.php Diff File
mod - application/views/admin/survey/_activation_error.php Diff File
mod - application/views/admin/themeoptions/update.php Diff File
mod - application/views/admin/token/browse.php Diff File
mod - application/views/admin/token/emailpost.php Diff File
mod - application/views/admin/token/emailwarning.php Diff File
rm - application/views/survey/questions/answer/5pointchoice/answer.php Diff File
add - application/views/survey/questions/answer/5pointchoice/answer.twig Diff File
rm - application/views/survey/questions/answer/5pointchoice/rows/item_row.php Diff File
add - application/views/survey/questions/answer/5pointchoice/rows/item_row.twig Diff File
mod - application/views/survey/questions/answer/list_dropdown/rows/othertext.php Diff File
mod - application/views/survey/questions/answer/listradio/rows/answer_row_other.php Diff File
mod - application/views/survey/questions/answer/multiplenumeric/rows/dynamic.twig Diff File
mod - application/views/survey/questions/answer/multiplenumeric/rows/dynamic_slider.twig Diff File
mod - application/views/survey/questions/answer/multiplenumeric/rows/sliders/answer_row.twig Diff File
mod - assets/packages/limesurvey/survey.js Diff File
add - assets/packages/questions/5pointchoice/css/emoji.css Diff File
add - assets/packages/questions/5pointchoice/css/ss-emoji.css Diff File
add - assets/packages/questions/5pointchoice/fonts/noto_emoji_color.ttf Diff File
add - assets/packages/questions/5pointchoice/fonts/noto_emoji_regular.ttf Diff File
add - assets/packages/questions/5pointchoice/fonts/ss-emoji-adobe-mozilla.ttf Diff File
mod - assets/scripts/admin/questions.js Diff File
mod - assets/scripts/admin/tokens.js Diff File
mod - assets/scripts/multiplechoice_withcomments.js Diff File
mod - assets/scripts/survey_runtime.js Diff File
mod - docs/release_notes.txt Diff File
mod - framework/cli/views/webapp/protected/controllers/SiteController.php Diff File
mod - index.php Diff File
mod - locale/_template/limesurvey.pot Diff File
mod - locale/ca/ca.mo Diff File
mod - locale/da/da.mo Diff File
mod - locale/de-informal/de-informal.mo Diff File
mod - locale/de/de.mo Diff File
mod - locale/es/es.mo Diff File
mod - locale/hu/hu.mo Diff File
mod - locale/it-informal/it-informal.mo Diff File
mod - locale/it/it.mo Diff File
mod - locale/ja/ja.mo Diff File
mod - locale/ka/ka.mo Diff File
mod - locale/nb/nb.mo Diff File
mod - locale/nl-informal/nl-informal.mo Diff File
mod - locale/nl/nl.mo Diff File
mod - locale/nn/nn.mo Diff File
rm - locale/pap-AW/index.html Diff File
rm - locale/pap-AW/pap-AW.mo Diff File
mod - locale/pl/pl.mo Diff File
mod - locale/ro/ro.mo Diff File
add - tests/LimeSurveyWebDriver.php Diff File
mod - tests/TestBaseClass.php Diff File
mod - tests/TestBaseClassWeb.php Diff File
mod - tests/TestHelper.php Diff File
mod - tests/bootstrap.php Diff File
add - tests/data/surveys/limesurvey_survey_143933.lss Diff File
add - tests/surveys/LanguageChangerTest.php Diff File
mod - themes/question/ranking_advanced/survey/questions/answer/ranking/answer.twig Diff File
mod - themes/survey/bootswatch/options/options.twig Diff File
mod - themes/survey/bootswatch/scripts/theme.js Diff File
mod - themes/survey/fruity/options/options.twig Diff File
mod - themes/survey/vanilla/options/options.twig Diff File
mod - themes/survey/vanilla/scripts/theme.js Diff File
mod - themes/survey/vanilla/views/layout_user_forms.twig Diff File
mod - themes/survey/vanilla/views/subviews/content/load.twig Diff File
mod - themes/survey/vanilla/views/subviews/content/save.twig Diff File
add - themes/survey/vanilla/views/subviews/content/userforms.twig Diff File
add - themes/survey/vanilla/views/subviews/logincomponents/captcha.twig Diff File
add - themes/survey/vanilla/views/subviews/logincomponents/token.twig Diff File
mod - themes/survey/vanilla/views/subviews/navigation/language_changer_top_menu.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/printanswers_head.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/printanswers_question.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/printanswers_table.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_array-increase-same-decrease.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_array-yes-uncertain-no.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_boilerplate.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_gender.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_upload-files.twig Diff File
mod - themes/survey/vanilla/views/subviews/printanswers/question_types/template_yes-no.twig Diff File
mod - themes/survey/vanilla/views/subviews/registration/register_form.twig Diff File
mod - themes/survey/vanilla/views/subviews/registration/register_message.twig Diff File
mod - themes/survey/vanilla/views/subviews/registration/register_success.twig Diff File
mod - themes/survey/vanilla/views/subviews/registration/required.twig Diff File
mod - themes/survey/vanilla/views/subviews/survey/group_subviews/group_desc.twig Diff File
mod - themes/survey/vanilla/views/subviews/survey/group_subviews/group_name.twig Diff File
rm - upload/surveys/index.html Diff File
rm - upload/surveys/readme.txt Diff File
rm - upload/templates/index.html Diff File
rm - upload/templates/readme.txt Diff File
rm - upload/themes/question/index.html Diff File
rm - upload/themes/survey/index.html Diff File

Issue History

Date Modified Username Field Change
2018-01-17 18:53 DenisChenu New Issue
2018-01-17 18:58 DenisChenu Note Added: 45877
2018-01-18 13:56 DenisChenu Note Added: 45891
2018-01-18 13:56 DenisChenu Project Feature requests => Bug reports
2018-01-19 16:13 DenisChenu Assigned To => DenisChenu
2018-01-19 16:13 DenisChenu Status new => assigned
2018-01-19 18:06 DenisChenu Changeset attached => LimeSurvey master a5a05d59
2018-01-19 18:06 DenisChenu Note Added: 45925
2018-01-19 18:06 DenisChenu Resolution open => fixed
2018-01-19 18:10 DenisChenu Status assigned => resolved
2018-01-19 18:10 DenisChenu Fixed in Version => 3.0.x
2018-01-19 18:10 DenisChenu Note Added: 45926
2018-01-22 11:05 LouisGac Note Added: 45944
2018-01-24 15:50 c_schmitz Note Added: 46010
2018-01-24 15:50 c_schmitz Status resolved => closed
2018-01-30 14:57 DenisChenu Changeset attached => LimeSurvey master abef4c6f
2018-01-30 14:57 DenisChenu Note Added: 46151