MantisBT - v2.4 Release (Closed)
View Issue Details
0000860v2.4 Release (Closed)[All Projects] Generalpublic2011-07-05 11:042011-08-16 23:38
Reporterlzhongsh 
Assigned Tocaseydk 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version2.4 
Summary0000860: LDAP failed with error: "contact owner is not set"
Description(I had a thread open at the Forum asking the same question, but did not get any response back. So I posted here again for better visibility. Sorry for the duplication. This is an urgent issue for us).


I have recently installed web2project, and enabled LDAP. However, the LDAP login never works, and it complains:

modules\contacts\contacts.class.php(92): CContact::store-check failed - contact owner is not set

This is an error during user creation. web2project authenticate the user against LDAP, and succeeded. It then tried to create a user in its database, but failed with the above message.
TagsNo tags attached.
Attached Files? LDAP.class.php (5,114) 1969-12-31 16:00
https://bugs.web2project.net/file_download.php?file_id=255&type=bug

Notes
(0002029)
caseydk   
2011-07-14 23:10   
Resolved in r1984, will be in next release;
(0002030)
lzhongsh   
2011-07-14 23:17   
How big is the code change? Can you send it to me so I can fix myself and not waiting for the next release? We need it working ASAP.
(0002033)
caseydk   
2011-07-14 23:32   
One line:

https://github.com/caseysoftware/web2project/commit/d5f2b6f6bca72b2a7275acd2b3da092abb398099
(0002083)
lzhongsh   
2011-07-25 21:46   
I finally got a chance to try this fix out. It seems moves one step further. Now I am getting:


contacts.class.php(115): CContact::store failed Out of range value for column 'contact_owner' at row 1


I debugged through it, and found that the value of "contact_owner" is set to -1. It seems like coming from "$AppUI->user_id". I am curious, what is $AppUI->user_id?

Any help greatly appreciated!
(0002093)
caseydk   
2011-07-30 15:21   
Just within the createsqluser method, you may need this line:

global $AppUI;
(0002096)
lzhongsh   
2011-07-30 15:34   
I have this line in that function. See attached code.

I tried hard coding contact_owner to 1, and it works, but I don't know if it is OK to hard code.
(0002104)
lzhongsh   
2011-08-01 15:26   
Any comments? What is "contact_owner" used for? Is it OK to hard code it to 1?
(0002105)
caseydk   
2011-08-01 18:10   
Yes, hard code it to whatever your ID is.

This is closed in the pending release.. which will become the actual release (and solve your problems) if people stop complaining that they have problems.

Issue History
2011-07-05 11:04lzhongshNew Issue
2011-07-14 23:08caseydkProjectv2.3 Release (Closed) => v2.4 Release (Closed)
2011-07-14 23:10caseydkNote Added: 0002029
2011-07-14 23:10caseydkStatusnew => resolved
2011-07-14 23:10caseydkResolutionopen => fixed
2011-07-14 23:10caseydkAssigned To => caseydk
2011-07-14 23:17lzhongshNote Added: 0002030
2011-07-14 23:17lzhongshStatusresolved => feedback
2011-07-14 23:17lzhongshResolutionfixed => reopened
2011-07-14 23:32caseydkNote Added: 0002033
2011-07-14 23:32caseydkStatusfeedback => resolved
2011-07-14 23:32caseydkResolutionreopened => fixed
2011-07-25 21:46lzhongshNote Added: 0002083
2011-07-25 21:46lzhongshStatusresolved => feedback
2011-07-25 21:46lzhongshResolutionfixed => reopened
2011-07-30 15:21caseydkNote Added: 0002093
2011-07-30 15:21caseydkStatusfeedback => resolved
2011-07-30 15:21caseydkResolutionreopened => fixed
2011-07-30 15:34lzhongshNote Added: 0002096
2011-07-30 15:34lzhongshStatusresolved => feedback
2011-07-30 15:34lzhongshResolutionfixed => reopened
2011-07-30 15:34lzhongshFile Added: LDAP.class.php
2011-08-01 14:56caseydkStatusfeedback => resolved
2011-08-01 14:56caseydkResolutionreopened => fixed
2011-08-01 15:26lzhongshNote Added: 0002104
2011-08-01 15:26lzhongshStatusresolved => feedback
2011-08-01 15:26lzhongshResolutionfixed => reopened
2011-08-01 18:10caseydkNote Added: 0002105
2011-08-01 18:10caseydkStatusfeedback => resolved
2011-08-01 18:10caseydkResolutionreopened => fixed
2011-08-01 18:15caseydkNote View State: 2105: public
2011-08-16 23:38caseydkStatusresolved => closed
2011-08-16 23:38caseydkFixed in Version => 2.4