View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
13198Bug reportsAuthenticationpublic2018-01-22 11:04
Reporterronqn Assigned ToLouisGac 
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version3.0.x 
Summary13198: "Automatically create user if it exists in LDAP server" first login doesn't work, second one works
Description

When I try to connect with a non-existing account from my LDAP Server with the "Automatically create user if it exists in LDAP server" option activated, when I log-in for the first time, I've get the PHP Warning, and the second time, it works correctly.

Steps To Reproduce

AuthLdap with the Search & Bind settings

Additional Information

PHP warning

Creating default object from empty value

/var/www/limestable/application/libraries/PluginManager/AuthPluginBase.php(80)

68 }
69
70 /*
71
Set authentication result to success for the given user object.
72
73
@param User $user
74 @return AuthPluginBase
75
/
76 public function setAuthSuccess(User $user)
77 {
78 $event = $this->getEvent();
79 $identity = $this->getEvent()->get('identity');
80 $identity->id = $user->uid;
81 $identity->user = $user;
82 $this->getEvent()->set('identity', $identity);
83 $event->set('result', new LSAuthResult(self::ERROR_NONE));
84
85 return $this;
86 }
87
88 /*
89
Set authentication result to failure.
90
91
@param int $code Any of the constants defined in this class
92 * @param string $message An optional message to return about the failure

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)3.0.4+180116
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5.0.12
Server OS (if known)Ubuntu Server 16.04
Webserver software & version (if known)Apache/2.4.18
PHP VersionPHP Version 7.0.22

Users monitoring this issue

There are no users monitoring this issue.

Activities

ronqn

ronqn

2018-01-18 08:35

reporter   ~45886

I tried my configuration with the same settings with the developement Version 3.0.0-RC.3+171114 and everything works fine. I couldn't reproduce the error.

ronqn

ronqn

2018-01-18 09:06

reporter   ~45887

Just tried the same thing with an Active-Directory, I'm getting the same error on LimeSurvey Version 3.0.4+180116.

Both the eDirectory and Active-Directory login with user creation work fine with the Version 3.0.0-RC.3+171114.

ronqn

ronqn

2018-01-18 13:45

reporter   ~45890

Version 2.73.0
I installed this version, tested with my settings and it works perfectly, the bug occurs with the Version 3.0.4+180116 where I have to login twice to make it work.

ronqn

ronqn

2018-01-22 08:31

reporter   ~45937

DenisChenu's fix works perfectly and fix the error. (13200)
Thanks

LouisGac

LouisGac

2018-01-22 11:04

developer   ~45943

thank you for your bug report and for your feedback ronqn, greatly appreciated

Issue History

Date Modified Username Field Change
2018-01-17 16:53 ronqn New Issue
2018-01-17 16:53 ronqn File Added: 2018-01-17 16_52_37-PHP warning.png
2018-01-18 08:35 ronqn Note Added: 45886
2018-01-18 09:06 ronqn Note Added: 45887
2018-01-18 13:45 ronqn Note Added: 45890
2018-01-22 08:31 ronqn Note Added: 45937
2018-01-22 11:04 LouisGac Assigned To => LouisGac
2018-01-22 11:04 LouisGac Status new => closed
2018-01-22 11:04 LouisGac Resolution open => fixed
2018-01-22 11:04 LouisGac Note Added: 45943