philbertphotos / osticket-multildap-auth-plugin

Plugin for OS Ticket that allows for authentication with multiple domains.
GNU General Public License v3.0
28 stars 17 forks source link

Table prefix missing in sync_mldap.php #20

Closed tauthement closed 5 years ago

tauthement commented 5 years ago

I received this error message through the system log:

[SELECT staff.username, ost_staff.email, ost_staff.phone, ost_staff.phone_ext as ext, ost_staff.mobile FROM ost_staff WHERE ost_staff.username IS NOT NULL]

Unknown column 'staff.username' in 'field list'

---- Backtrace ----

0 (root)/include/mysqli.php(199): osTicket->logDBError('DB Error #1054', '[SELECT staff.u...')

1 (root)/scp/sync_mldap.php(361): db_query('SELECT staff.us...')

2 (root)/include/plugins/multi-ldap/auth.php(77): SyncLDAPMultiClass->check_users()

3 [internal function]: LdapMultiAuthPlugin->onCronProcessed(NULL, Array)

4 (root)/include/class.signal.php(98): call_user_func_array(Array, Array)

5 (root)/scp/autocron.php(69): Signal::send('cron', NULL, Array)

6 {main}

Fix: Upon inspecting sync_mldap.php, I noticed that "TABLE_PREFIX . " was missing from line 359.

tauthement commented 5 years ago

I want to also note that this may have caused an LDAP Sync error in my System Log, as well. It has the same timestamp as the DB error above. Here is the message I received:

Sync executed on (November 13 2018 8:40 am) next execution in (November 13 2018 10:40 am)Total ldapusers: (884) Total agents: (0) Total Updated Users: (0) Execute Time: (0:00:00.389)

philbertphotos commented 5 years ago

Send me the DB error so i can do some tests

Sent from my iPhone

On Nov 13, 2018, at 11:50 AM, Timmy Authement notifications@github.com wrote:

I want to also note that this may have caused an LDAP Sync error in my System Log, as well. It has the same timestamp as the DB error above. Here is the message I received:

Sync executed on (November 13 2018 8:40 am) next execution in (November 13 2018 10:40 am)Total ldapusers: (884) Total agents: (0) Total Updated Users: (0) Execute Time: (0:00:00.389)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

philbertphotos commented 5 years ago

Ohh the prefix is missing .. i will fix that today.

Sent from my iPhone

On Nov 13, 2018, at 11:50 AM, Timmy Authement notifications@github.com wrote:

I want to also note that this may have caused an LDAP Sync error in my System Log, as well. It has the same timestamp as the DB error above. Here is the message I received:

Sync executed on (November 13 2018 8:40 am) next execution in (November 13 2018 10:40 am)Total ldapusers: (884) Total agents: (0) Total Updated Users: (0) Execute Time: (0:00:00.389)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

philbertphotos commented 5 years ago

FIXED