Skip to content
Snippets Groups Projects
Commit 783f4482 authored by Tim Steiner's avatar Tim Steiner
Browse files

Merging trunk into testing

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/testing@274 20a16fea-79d4-4915-8869-1ea9d5ebf173
parents 56e79901 84169279
No related branches found
No related tags found
No related merge requests found
......@@ -161,7 +161,8 @@ function unl_cas_user_logout($account) {
function unl_cas_import_user($username) {
$xml = @file_get_contents('http://peoplefinder.unl.edu/service.php?format=xml&uid=' . $username);
if ($xml) {
$dom = DOMDocument::loadXML($xml);
$dom = new DOMDocument();
$dom->loadXML($xml);
$firstName = $dom->getElementsByTagName('givenName')->item(0)->textContent;
$lastName = $dom->getElementsByTagName('sn')->item(0)->textContent;
$email = $dom->getElementsByTagName('mail')->item(0)->textContent;
......@@ -172,7 +173,10 @@ function unl_cas_import_user($username) {
}
$userData = array(
'name' => $username, 'mail' => $email, 'status' => 1
'name' => $username,
'mail' => $email,
'status' => 1,
'timezone' => variable_get('date_default_timezone', @date_default_timezone_get()),
);
$user = user_save(NULL, $userData);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment