Skip to content
Snippets Groups Projects
Commit 72ff0fc8 authored by Brendan Blaine's avatar Brendan Blaine
Browse files

changes for peronal event calendars

parent 991f9c53
Branches calendar_sub
No related tags found
No related merge requests found
...@@ -52,21 +52,7 @@ function drupalorg_drupalcon_user_presave(&$edit, $account, $category) { ...@@ -52,21 +52,7 @@ function drupalorg_drupalcon_user_presave(&$edit, $account, $category) {
} }
} }
*/ */
do {
$calendar_key = substr(sha1(rand()), 0, 10);
$query = new EntityFieldQuery();
$result = $query
->entityCondition('entity_type', 'user')
->fieldCondition('field_calendar_key', 'value', $calendar_key)
->count()
->execute();
} while ($result != 0);
$wrapper = entity_metadata_wrapper('user', $account);
if (empty($account->field_calendar_key)) {
$wrapper->field_calendar_key = $calendar_key;
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment