diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 57d5335a..bdc6968f 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -81,6 +81,21 @@ function array_delete($values, $array) { } +/** + * Checks if a string exists in an array, ignoring case. + */ +function in_array_ignore_case( $needle, $haystack ) +{ + if( ! is_array( $haystack ) ) + return false; + if( ! is_string( $needle ) ) + return false; + foreach( $haystack as $element ) + if( is_string( $element ) && 0 == strcasecmp( $needle, $element ) ) + return true; + return false; +} + /** * This function will return a password with max. 8 characters. * diff --git a/lam/lib/tree.inc b/lam/lib/tree.inc index 0a638e59..2841115e 100644 --- a/lam/lib/tree.inc +++ b/lam/lib/tree.inc @@ -1089,21 +1089,6 @@ function is_dn_attr( $attr_name ) return false; } -/** - * Checks if a string exists in an array, ignoring case. - */ -function in_array_ignore_case( $needle, $haystack ) -{ - if( ! is_array( $haystack ) ) - return false; - if( ! is_string( $needle ) ) - return false; - foreach( $haystack as $element ) - if( is_string( $element ) && 0 == strcasecmp( $needle, $element ) ) - return true; - return false; -} - function get_enc_type( $user_password ) { /* Capture the stuff in the { } to determine if this is crypt, md5, etc. */