You are here

function _cas_array_insert in CAS 6.3

Same name and namespace in other branches
  1. 7 cas.module \_cas_array_insert()

Insert an array into the specified position of another array.

Preserves keys in associative arrays.

See also

http://www.php.net/manual/en/function.array-splice.php#56794

1 call to _cas_array_insert()
cas_form_alter in ./cas.module
Implementation of hook_form_alter().

File

./cas.module, line 1244
Enables users to authenticate via a Central Authentication Service (CAS) Cas will currently work if the auto registration is turned on and will create user accounts automatically.

Code

function _cas_array_insert(&$array, $position, $insert_array) {
  $first_array = array_splice($array, 0, $position);
  $array = array_merge($first_array, $insert_array, $array);
}