- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Extending LDAP plugin
- quasar_
- Topic Author
- Offline
- New Member
Less
More
1 year 10 months ago - 1 year 10 months ago #228824
by quasar_
Extending LDAP plugin was created by quasar_
My LimeSurvey version: 5.3.15
Own server or LimeSurvey hosting: Own Server
==================
Hello,
I wanted to change a few things in the LDAP plugin, so I copied the core plugin from /application/core/plugins/AuthLDAP to the /plugins directory.
Then I renamed the directory, AuthLDAP.php, the class name and $name inside AuthLDAP.php all to the same new name. I also changed the config.xml metadata name.
Then I clicked "Scan files" under "Configuration" > "Plugins", chose my plugin and clicked on "Install".
Next I configured my plugin and set it up the same way I set up the core LDAP plugin.
I then activated my plugin and when I log in I get the error: "Incorrect username and/or password!"
The error message is probably a default one because username and password are definitely correct as they function correctly when using the ldap core plugin.
I also checked the table lime_plugins which says load_error NULL:
| id | name | active | version | load_error | load_error_message | plugin_type | priority |
| 1 | Authdb | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 2 | AuditLog | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 3 | Authwebserver | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 4 | ExportR | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 6 | oldUrlCompat | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 8 | ExportSTATAxml | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 16 | AuthLDAP | 0 | 1.0.0 | 0 | | core | 0 |
| 17 | ComfortUpdateChecker | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 18 | PasswordRequirement | 1 | 1.1.0 | 0 | NULL | core | 0 |
| 19 | expressionQuestionHelp | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 20 | expressionQuestionForAll | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 21 | expressionFixedDbVar | 0 | 1.0.2 | 0 | NULL | core | 0 |
| 22 | customToken | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 23 | mailSenderToFrom | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 24 | MyAuthLDAP | 1 | 1.0.0 | NULL | NULL | user | 0 |
As a last resort I could just modify the core plugin but do not want to change it everytime it gets updated.
Any help is appreciated.
Own server or LimeSurvey hosting: Own Server
==================
Hello,
I wanted to change a few things in the LDAP plugin, so I copied the core plugin from /application/core/plugins/AuthLDAP to the /plugins directory.
Then I renamed the directory, AuthLDAP.php, the class name and $name inside AuthLDAP.php all to the same new name. I also changed the config.xml metadata name.
Then I clicked "Scan files" under "Configuration" > "Plugins", chose my plugin and clicked on "Install".
Next I configured my plugin and set it up the same way I set up the core LDAP plugin.
I then activated my plugin and when I log in I get the error: "Incorrect username and/or password!"
The error message is probably a default one because username and password are definitely correct as they function correctly when using the ldap core plugin.
I also checked the table lime_plugins which says load_error NULL:
| id | name | active | version | load_error | load_error_message | plugin_type | priority |
| 1 | Authdb | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 2 | AuditLog | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 3 | Authwebserver | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 4 | ExportR | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 6 | oldUrlCompat | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 8 | ExportSTATAxml | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 16 | AuthLDAP | 0 | 1.0.0 | 0 | | core | 0 |
| 17 | ComfortUpdateChecker | 1 | 1.0.0 | 0 | NULL | core | 0 |
| 18 | PasswordRequirement | 1 | 1.1.0 | 0 | NULL | core | 0 |
| 19 | expressionQuestionHelp | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 20 | expressionQuestionForAll | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 21 | expressionFixedDbVar | 0 | 1.0.2 | 0 | NULL | core | 0 |
| 22 | customToken | 0 | 1.0.1 | 0 | NULL | core | 0 |
| 23 | mailSenderToFrom | 0 | 1.0.0 | 0 | NULL | core | 0 |
| 24 | MyAuthLDAP | 1 | 1.0.0 | NULL | NULL | user | 0 |
As a last resort I could just modify the core plugin but do not want to change it everytime it gets updated.
Any help is appreciated.
Last edit: 1 year 10 months ago by quasar_. Reason: Change table format
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
1 year 10 months ago #229063
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Extending LDAP plugin
Can you send your updated plugin ?
Can you check if you have plugin_settings for plugin id 24 here ?
Can you check if you have plugin_settings for plugin id 24 here ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.
- quasar_
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
1 year 10 months ago #229098
by quasar_
Replied by quasar_ on topic Extending LDAP plugin
Thank you for your reply.
Do you mean uploading it here? I can do that, but like I said I only changed the things mentioned above. Other than that it is the same code as the core one.
I checked plugin_settings and there are 21 entries for plugin id 24. Values are the same as core AuthLDAP.
Do you mean uploading it here? I can do that, but like I said I only changed the things mentioned above. Other than that it is the same code as the core one.
I checked plugin_settings and there are 21 entries for plugin id 24. Values are the same as core AuthLDAP.
Please Log in to join the conversation.