moved in_array_ignore_case to account.inc
This commit is contained in:
parent
3d0191f553
commit
48cbd62917
|
@ -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.
|
* This function will return a password with max. 8 characters.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1089,21 +1089,6 @@ function is_dn_attr( $attr_name )
|
||||||
return false;
|
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 )
|
function get_enc_type( $user_password )
|
||||||
{
|
{
|
||||||
/* Capture the stuff in the { } to determine if this is crypt, md5, etc. */
|
/* Capture the stuff in the { } to determine if this is crypt, md5, etc. */
|
||||||
|
|
Loading…
Reference in New Issue