Repository navigation
Commit 39d27f8
Don't save contacts with owner -1 when no one is logged in
CContact::hook_preStore() fills an empty contact_owner with the current
user id. Before login that id is -1, which the unsigned contact_owner
column rejects in strict SQL mode ("Out of range value"). This is what
happens on an LDAP user's first login: the contact insert fails, the new
user is saved with user_contact = 0, and is then missing from User
Management, so an admin cannot give it a role.
Use 0 (no owner) when the current user id is not positive.
Refs #320
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016CP89WVmGZ1VVCCZMS6ntN1 parent 444070c commit 39d27f8
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
0 commit comments