You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is the correct flow to adding a new user from LDAP?
I've successfully configured the LDAP options to my companie's AD. When logging in, I can see thought the logs (and error_log commands added by myself) that Web2Project can connect to AD an retrieve the user object.
But then, Web2Project tries to store the user object on the database, but there's no permission to that.
I got to the class classes/w2p/Extensions/Permissions.class.php, under function w2Pacl_check, and it is called with relevant parameters $op='add' $userid=-1 $module='users'. On the gacl_permissions table, there's no permission for userid=-1.
If I try to create a new user, there's no option to lookup the LDAP for user info.
I haven't dug into the LDAP flows in quite a while but I believe the correct approach is to import the user, assign them roles+permissions, and then they can log in directly.
39d27f84 and 27b2354d: a new LDAP user always gets a contact. The contact insert failed (owner -1 on strict servers), so the user was saved without one and didn't appear in User Management. d2155ccf: LDAP passwords are hashed once, and the local copy is only updated when it actually changes. 708285f4: migration 065 gives existing users without a contact a placeholder, so they show up again.
The intended flow: the user logs in once with LDAP, appears under Inactive Users, and an admin assigns a role.
Activity
caseysoftware commentedon Jan 31, 2019
I haven't dug into the LDAP flows in quite a while but I believe the correct approach is to import the user, assign them roles+permissions, and then they can log in directly.
humbertofraga commentedon Jan 31, 2019
Ok, understood that.
But how does the admin import new users? Navigating, I've got to the New User screen, but I can't find any option to import from LDAP.
caseysoftware commentedon Jan 28, 2025
Did you get this one figured out? I don't have an LDP system to test against but plan to build SAML and OIDC eventually.
Don't save contacts with owner -1 when no one is logged in
LDAP: hash new users' passwords once and only update them when they c…
LDAP: always create a contact for a new user
Give existing users without a contact a placeholder contact
caseysoftware commentedon Oct 16, 2026
Fixed on dev-5.0.0, will ship in 5.0:
39d27f84 and 27b2354d: a new LDAP user always gets a contact. The contact insert failed (owner -1 on strict servers), so the user was saved without one and didn't appear in User Management.
d2155ccf: LDAP passwords are hashed once, and the local copy is only updated when it actually changes.
708285f4: migration 065 gives existing users without a contact a placeholder, so they show up again.
The intended flow: the user logs in once with LDAP, appears under Inactive Users, and an admin assigns a role.