MantisBT - v3.0 Release
View Issue Details
0001098v3.0 Release[All Projects] Generalpublic2012-03-19 02:242013-08-28 11:18
Reporterpcamps1 
Assigned Tocaseydk 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001098: No new user creation after LDAP authentication
DescriptionAfter LDAP authentication, a new user is not created in the database.
Additional InformationThe problem comes from lines 155 to 161 (function createsqluser) in LDAP.class.php (classes/w2p/Authenticators) :
 $u = new CUser();
 $u->user_username = $username;
 $u->user_password = $hash_pass;
 $u->user_type = 0; // Changed from 1 (administrator) to 0 (Default user)
 $u->user_contact = (int) $contact_id;
 $u->store($AppUI);
 $user_id = $u->user_id;

Just need to replace these lines by lines 98 to 109 coming from PostNuke.class.php (classes/w2p/Authenticators) :
 $q = new w2p_Database_Query;
 $q->addTable('users');
 $q->addInsert('user_username', $username);
 $q->addInsert('user_password', $password);
 $q->addInsert('user_type', '7'); // 7 = employ√©
 $q->addInsert('user_contact', $c->contact_id);
 if (!$q->exec()) {
    die($AppUI->_('Failed to create user credentials'));
 }
 $user_id = $db->Insert_ID();
 $this->user_id = $user_id;
 $q->clear();
TagsNo tags attached.
Attached Files

Notes
(0002676)
caseydk   
2012-10-28 20:27   
Resolved: https://github.com/caseysoftware/web2project/pull/151

Issue History
2012-03-19 02:24pcamps1New Issue
2012-04-21 19:07caseydkProjectv2.4 Release (Closed) => v3.0 Release
2012-10-28 20:27caseydkNote Added: 0002676
2012-10-28 20:27caseydkStatusnew => resolved
2012-10-28 20:27caseydkResolutionopen => fixed
2012-10-28 20:27caseydkAssigned To => caseydk
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:18caseydkStatusresolved => closed