--- SOGo/SoObjects/SOGo/SQLSource.m	2011-03-20 21:31:59.000000000 +0100
+++ SOGo.orig/SoObjects/SOGo/SQLSource.m	2011-03-20 21:42:14.000000000 +0100
@@ -157,31 +157,6 @@
   return NO;
 }
 
-// Method for encrypt a password, based on _isPassword
-- (NSString *) _encryptPassword: (NSString *) plainPassword
-{
-  if ([_userPasswordAlgorithm caseInsensitiveCompare: @"none"] == NSOrderedSame)
-    {
-      return plainPassword;
-    }
-  else if ([_userPasswordAlgorithm caseInsensitiveCompare: @"crypt"] == NSOrderedSame)
-    {
-      return [plainPassword asCryptStringUsingSalt: [plainPassword asMD5String]];
-    }
-  else if ([_userPasswordAlgorithm caseInsensitiveCompare: @"md5"] == NSOrderedSame)
-    {
-      return [plainPassword asMD5String];
-    }
-  else if ([_userPasswordAlgorithm caseInsensitiveCompare: @"sha"] == NSOrderedSame)
-    {
-      return [plainPassword asSHA1String];
-    }
-
-  [self errorWithFormat: @"Unsupported user-password algorithm: %@", _userPasswordAlgorithm];
-
-  return plainPassword;
-}
-
 //
 // SQL sources don't support right now all the password policy
 // stuff supported by OpenLDAP (and others). If we want to support
@@ -237,60 +212,14 @@
   return rc;
 }
 
-
-// Method for changing passwords with SQL, code fragments from other methods in this code
 - (BOOL) changePasswordForLogin: (NSString *) login
 		    oldPassword: (NSString *) oldPassword
 		    newPassword: (NSString *) newPassword
 			   perr: (SOGoPasswordPolicyError *) perr
 {
-	EOAdaptorChannel *channel;
-	GCSChannelManager *cm;
-	NSException *ex;
-	NSString *sqlstr;
-	BOOL didChange;
-	BOOL isOldPwdOk;
-	
-	isOldPwdOk = NO;
-	didChange = NO;
-	
-	// Now set Password with configured password encryption
-	isOldPwdOk = [self checkLogin:login password:oldPassword perr:perr expire:0 grace:0];
-
-	if(isOldPwdOk)
-	{
-		// encrypt new password
-		NSString *encryptedPassword = [self _encryptPassword: newPassword];
-
-		// save new password
-		login = [login stringByReplacingString: @"'"  withString: @"''"];
-		cm = [GCSChannelManager defaultChannelManager];
-		channel = [cm acquireOpenChannelForURL: _viewURL];
-		if (channel)
-		{
-			// first, create sql-command
-			sqlstr = [NSString stringWithFormat: (@"UPDATE %@"
-							@" SET c_password = '%@'"
-							@" WHERE c_uid = '%@'"),
-				[_viewURL gcsTableName], encryptedPassword, login];
-	
-			ex = [channel evaluateExpressionX: sqlstr];
-			if (!ex)
-			{
-				didChange = YES;
-			}
-			else
-			{
-				[self errorWithFormat: @"could not run SQL '%@': %@", sqlstr, ex];
-			}
-			[cm releaseChannel: channel];
-		}
-	}
-
-	return didChange;
+  return NO;
 }
 
-
 - (NSString *) _whereClauseFromArray: (NSArray *) theArray
                                value: (NSString *) theValue
 			       exact: (BOOL) theBOOL
