[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge-plugin-ldapextauth/include LdapExtAuthPlugin.cla
From: |
tperdue |
Subject: |
[Gforge-commits] gforge-plugin-ldapextauth/include LdapExtAuthPlugin.class, 1.2, 1.3 |
Date: |
Wed, 29 Sep 2004 22:17:42 -0500 |
Update of /cvsroot/gforge/gforge-plugin-ldapextauth/include
In directory db.perdue.net:/var/www/gforge/plugins/ldapextauth/include
Modified Files:
LdapExtAuthPlugin.class
Log Message:
cleaning up and adding checks to ldap plugin so it
Index: LdapExtAuthPlugin.class
===================================================================
RCS file:
/cvsroot/gforge/gforge-plugin-ldapextauth/include/LdapExtAuthPlugin.class,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- LdapExtAuthPlugin.class 23 Sep 2004 21:11:22 -0000 1.2
+++ LdapExtAuthPlugin.class 30 Sep 2004 03:17:39 -0000 1.3
@@ -86,15 +86,18 @@
// Password from form is valid in LDAP
if (session_login_valid_dbonly ($loginname,
$passwd, false)) {
// Also according to DB
+ $GLOBALS['ldap_auth_failed']=false;
return true ;
} else {
// Passwords mismatch, update DB's
$u->setPasswd ($passwd) ;
+ $GLOBALS['ldap_auth_failed']=false;
return true ;
}
} else {
// Wrong password according to LDAP
$feedback=$Language->getText('session','invalidpasswd');
+ $GLOBALS['ldap_auth_failed']=true;
return false ;
}
} else {
@@ -170,15 +173,24 @@
$ccode = $mappedinfo['ccode'] ;
}
- $u->create
($unix_name,$firstname,$lastname,$password1,$password2,$email,
+ if (!$u->create
($unix_name,$firstname,$lastname,$password1,$password2,$email,
$mail_site,$mail_va,$language_id,$timezone,$jabber_address,$jabber_only,$theme_id,
- $unix_box, $address, $address2,
$phone, $fax, $title, $ccode, $send_mail) ;
-
-
+ $unix_box, $address, $address2,
$phone, $fax, $title, $ccode, $send_mail)) {
+ $GLOBALS['ldap_auth_failed']=true;
+ echo "<br>Error Creating User:
".$u->getErrorMessage();
+ return false;
+ }
- $u->setStatus ('A') ;
+ if (!$u->setStatus ('A')) {
+ $GLOBALS['ldap_auth_failed']=true;
+ echo "<br>Error Activating User:
".$u->getErrorMessage();
+ return false;
+ }
+ $GLOBALS['ldap_auth_failed']=false;
+ $GLOBALS['ldap_first_login']=true;
return true ;
} else {
+ $GLOBALS['ldap_auth_failed']=true;
$feedback=$Language->getText('session','invalidpasswd');
return false ; // Probably ignored, but just in
case
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge-plugin-ldapextauth/include LdapExtAuthPlugin.class, 1.2, 1.3,
tperdue <=