security updates
have to check views and entityreference for custom patches
This commit is contained in:
@@ -6,9 +6,9 @@ core = "7.x"
|
||||
dependencies[] = logintoboggan
|
||||
dependencies[] = content_access
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-02-04
|
||||
version = "7.x-1.3+6-dev"
|
||||
; Information added by Drupal.org packaging script on 2014-07-08
|
||||
version = "7.x-1.4"
|
||||
core = "7.x"
|
||||
project = "logintoboggan"
|
||||
datestamp = "1359940268"
|
||||
datestamp = "1404818634"
|
||||
|
||||
|
@@ -6,9 +6,9 @@ core = "7.x"
|
||||
dependencies[] = logintoboggan
|
||||
dependencies[] = rules
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-02-04
|
||||
version = "7.x-1.3+6-dev"
|
||||
; Information added by Drupal.org packaging script on 2014-07-08
|
||||
version = "7.x-1.4"
|
||||
core = "7.x"
|
||||
project = "logintoboggan"
|
||||
datestamp = "1359940268"
|
||||
datestamp = "1404818634"
|
||||
|
||||
|
@@ -5,9 +5,9 @@ core = "7.x"
|
||||
dependencies[] = logintoboggan
|
||||
dependencies[] = variable
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-02-04
|
||||
version = "7.x-1.3+6-dev"
|
||||
; Information added by Drupal.org packaging script on 2014-07-08
|
||||
version = "7.x-1.4"
|
||||
core = "7.x"
|
||||
project = "logintoboggan"
|
||||
datestamp = "1359940268"
|
||||
datestamp = "1404818634"
|
||||
|
||||
|
@@ -7,9 +7,9 @@ configure = admin/config/system/logintoboggan
|
||||
stylesheets[all][] = logintoboggan.css
|
||||
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-02-04
|
||||
version = "7.x-1.3+6-dev"
|
||||
; Information added by Drupal.org packaging script on 2014-07-08
|
||||
version = "7.x-1.4"
|
||||
core = "7.x"
|
||||
project = "logintoboggan"
|
||||
datestamp = "1359940268"
|
||||
datestamp = "1404818634"
|
||||
|
||||
|
@@ -34,7 +34,7 @@ function logintoboggan_update_7000(&$sandbox) {
|
||||
),
|
||||
);
|
||||
|
||||
update_fix_d7_block_deltas($sandbox, $renamed_deltas, array());
|
||||
update_fix_d7_block_deltas($sandbox, $renamed_deltas);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -447,8 +447,9 @@ function logintoboggan_user_register_submit($form, &$form_state) {
|
||||
$pre_auth = logintoboggan_validating_id() != DRUPAL_AUTHENTICATED_RID;
|
||||
|
||||
// If we are allowing user selected passwords then skip the auto-generate function
|
||||
// The new user's status will be 1 (visitors can create own accounts) if reg_pass_set == 1
|
||||
// Immediate login, we are going to assign a pre-auth role, until email validation completed
|
||||
// The new user's status should default to the site settings, unless reg_passwd_set == 1
|
||||
// (immediate login, we are going to assign a pre-auth role), and we want to allow
|
||||
// admin approval accounts access to the site.
|
||||
if ($reg_pass_set) {
|
||||
$pass = $form_state['values']['pass'];
|
||||
$status = 1;
|
||||
@@ -504,7 +505,7 @@ function logintoboggan_user_register_submit($form, &$form_state) {
|
||||
// 3. Visitors can create their own accounts.
|
||||
$message = t('Further instructions have been sent to your e-mail address.');
|
||||
if($reg_pass_set && $pre_auth && variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) == USER_REGISTER_VISITORS) {
|
||||
$message = t('A validation e-mail has been sent to your e-mail address. You will need to follow the instructions in that message in order to gain full access to the site.');
|
||||
$message = t('A validation e-mail has been sent to your e-mail address. In order to gain full access to the site, you will need to follow the instructions in that message.');
|
||||
}
|
||||
|
||||
if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) == USER_REGISTER_VISITORS) {
|
||||
@@ -559,12 +560,6 @@ function logintoboggan_user_login_validate($form, &$form_state) {
|
||||
* @ingroup logintoboggan_form
|
||||
*/
|
||||
function logintoboggan_user_register_validate($form, &$form_state) {
|
||||
//Check to see whether our username matches any email address currently in the system.
|
||||
if($mail = db_query("SELECT mail FROM {users} WHERE LOWER(:name) = LOWER(mail)", array(
|
||||
':name' => $form_state['values']['name'],
|
||||
))->fetchField()) {
|
||||
form_set_error('name', t('This e-mail has already been taken by another user.'));
|
||||
}
|
||||
//Check to see whether our e-mail address matches the confirm address if enabled.
|
||||
if (variable_get('logintoboggan_confirm_email_at_registration', 0) && isset($form_state['values']['conf_mail'])) {
|
||||
if ($form_state['values']['mail'] != $form_state['values']['conf_mail']) {
|
||||
@@ -624,11 +619,11 @@ function logintoboggan_user_edit_validate($form, &$form_state) {
|
||||
*
|
||||
* @ingroup logintoboggan_core
|
||||
*
|
||||
* This is the best current place to dynamically remove the authenticated role
|
||||
* from the user object on initial page load. hook_init() is too late, as menu
|
||||
* access checks have already been performed.
|
||||
* This is currently the best place to dynamically remove the authenticated role
|
||||
* from the user object, hook_boot() allows us to act on the user object before
|
||||
* any access checks are performed.
|
||||
*/
|
||||
function logintoboggan_menu_get_item_alter() {
|
||||
function logintoboggan_boot() {
|
||||
global $user;
|
||||
|
||||
// Make sure any user with pre-auth role doesn't have authenticated user role
|
||||
@@ -749,6 +744,12 @@ function logintoboggan_revalidate_access($account) {
|
||||
* Which form to display, should be 'login' or 'register'.
|
||||
*/
|
||||
function logintoboggan_unified_login_page($active_form = 'login') {
|
||||
// Sanitise the $active_form text as it comes direct from the url.
|
||||
// It should only ever be 'login' or 'register', so default to 'login'.
|
||||
if ($active_form != 'login' && $active_form != 'register') {
|
||||
$active_form = 'login';
|
||||
}
|
||||
|
||||
global $user;
|
||||
if ($user->uid) {
|
||||
menu_set_active_item('user/' . $user->uid);
|
||||
|
@@ -83,7 +83,7 @@ function user_user_import_data($settings, $update_setting, $column_settings, $mo
|
||||
$parsed['year']
|
||||
);
|
||||
|
||||
if (!empty($timestamp) && is_numerric($timestamp)) {
|
||||
if (!empty($timestamp) && is_numeric($timestamp)) {
|
||||
$value = $timestamp;
|
||||
}
|
||||
}
|
||||
|
@@ -5,6 +5,26 @@
|
||||
* Provide administration configuration pages to import users.
|
||||
*/
|
||||
|
||||
function user_import_confirm_delete($form, &$form_state, $import_id) {
|
||||
|
||||
$form['import_id'] = array(
|
||||
'#type' => 'value',
|
||||
'#value' => $import_id,
|
||||
);
|
||||
|
||||
return confirm_form($form,
|
||||
t('Are you sure you want to delete the user import process?'),
|
||||
'admin/people/user_import',
|
||||
t('Deleting a user import process will also delete the file from which user data was being read. This action cannot be undone.'),
|
||||
t('Delete'), t('Cancel'));
|
||||
}
|
||||
|
||||
function user_import_confirm_delete_submit($form, &$form_state) {
|
||||
if ($form_state['values']['confirm']) {
|
||||
user_import_delete($form_state['values']['import_id']);
|
||||
}
|
||||
}
|
||||
|
||||
function user_import_list($action = NULL, $import_id = NULL) {
|
||||
|
||||
// clear incomplete imports
|
||||
@@ -70,6 +90,28 @@ function user_import_preferences($import_id = NULL, $template_id = NULL) {
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function user_import_confirm_continue($form, &$form_state, $import_id) {
|
||||
|
||||
$form['import_id'] = array(
|
||||
'#type' => 'value',
|
||||
'#value' => $import_id,
|
||||
);
|
||||
|
||||
return confirm_form($form,
|
||||
t('Are you sure you want to continue to import users?'),
|
||||
'admin/people/user_import',
|
||||
t('Restart user import from where it last finished.'),
|
||||
t('Continue'), t('Cancel'));
|
||||
}
|
||||
|
||||
function user_import_confirm_continue_submit($form, &$form_state) {
|
||||
if ($form_state['values']['confirm']) {
|
||||
user_import_continue($form_state['values']['import_id']);
|
||||
}
|
||||
}
|
||||
|
||||
function user_import_continue($import_id = NULL) {
|
||||
|
||||
if (!empty($import_id) && is_numeric($import_id)) {
|
||||
@@ -81,6 +123,26 @@ function user_import_continue($import_id = NULL) {
|
||||
drupal_goto('admin/people/user_import');
|
||||
}
|
||||
|
||||
function user_import_confirm_import($form, &$form_state, $import_id) {
|
||||
|
||||
$form['import_id'] = array(
|
||||
'#type' => 'value',
|
||||
'#value' => $import_id,
|
||||
);
|
||||
|
||||
return confirm_form($form,
|
||||
t('Are you sure you want to import users?'),
|
||||
'admin/people/user_import',
|
||||
t('Start importing users.'),
|
||||
t('Import'), t('Cancel'));
|
||||
}
|
||||
|
||||
function user_import_confirm_import_submit($form, &$form_state) {
|
||||
if ($form_state['values']['confirm']) {
|
||||
user_import_import($form_state['values']['import_id']);
|
||||
}
|
||||
}
|
||||
|
||||
function user_import_import($import_id = NULL) {
|
||||
|
||||
if (!empty($import_id) && is_numeric($import_id)) {
|
||||
|
@@ -11,9 +11,9 @@ files[] = user_import.test
|
||||
|
||||
|
||||
|
||||
; Information added by Drupal.org packaging script on 2014-03-09
|
||||
version = "7.x-2.2"
|
||||
; Information added by Drupal.org packaging script on 2015-04-01
|
||||
version = "7.x-2.3"
|
||||
core = "7.x"
|
||||
project = "user_import"
|
||||
datestamp = "1394331207"
|
||||
datestamp = "1427908388"
|
||||
|
||||
|
@@ -54,6 +54,10 @@ function user_import_permission() {
|
||||
'title' => t('Import users'),
|
||||
'description' => t('Import users.'),
|
||||
),
|
||||
'limited user import' => array(
|
||||
'title' => t('Import users Reports'),
|
||||
'description' => t('View import error reports.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -84,23 +88,26 @@ function user_import_menu() {
|
||||
'type' => MENU_LOCAL_TASK,
|
||||
'file' => 'user_import.admin.inc',
|
||||
);
|
||||
$items['admin/people/user_import/continue'] = array(
|
||||
$items['admin/people/user_import/continue/%'] = array(
|
||||
'title' => 'Continue',
|
||||
'page callback' => 'user_import_continue',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('user_import_confirm_continue', 4),
|
||||
'access arguments' => array('import users'),
|
||||
'type' => MENU_CALLBACK,
|
||||
'file' => 'user_import.admin.inc',
|
||||
);
|
||||
$items['admin/people/user_import/import'] = array(
|
||||
$items['admin/people/user_import/import/%'] = array(
|
||||
'title' => 'Import',
|
||||
'page callback' => 'user_import_import',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('user_import_confirm_import', 4),
|
||||
'access arguments' => array('import users'),
|
||||
'type' => MENU_CALLBACK,
|
||||
'file' => 'user_import.admin.inc',
|
||||
);
|
||||
$items['admin/people/user_import/delete'] = array(
|
||||
$items['admin/people/user_import/delete/%'] = array(
|
||||
'title' => 'Delete Import',
|
||||
'page callback' => 'user_import_delete',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('user_import_confirm_delete', 4),
|
||||
'access arguments' => array('import users'),
|
||||
'type' => MENU_CALLBACK,
|
||||
'file' => 'user_import.admin.inc',
|
||||
@@ -113,15 +120,10 @@ function user_import_menu() {
|
||||
'type' => MENU_LOCAL_TASK,
|
||||
'file' => 'user_import.admin.inc',
|
||||
);
|
||||
$items['user_import/delete'] = array(
|
||||
'title' => 'Remove Info',
|
||||
'page callback' => 'user_import_limited_delete',
|
||||
'type' => MENU_CALLBACK,
|
||||
'access arguments' => array('limited user import'),
|
||||
);
|
||||
$items['user_import/errors'] = array(
|
||||
$items['admin/people/user_import/errors/%'] = array(
|
||||
'title' => 'Import Errors',
|
||||
'page callback' => 'user_import_limited_errors',
|
||||
'page arguments' => array(4),
|
||||
'type' => MENU_CALLBACK,
|
||||
'access arguments' => array('limited user import'),
|
||||
);
|
||||
@@ -212,11 +214,8 @@ function user_import_trigger_imports() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
|
||||
// Get template.
|
||||
$settings = _user_import_settings_select(2);
|
||||
|
||||
@@ -277,17 +276,17 @@ function user_import_content_type_submit($form, &$form_state) {
|
||||
// - - - - - - - - PAGES - - - - - - - -
|
||||
|
||||
function user_import_limited_errors($import_id = NULL, $template_id = NULL) {
|
||||
|
||||
if (empty($import_id) || !is_numeric($import_id)) {
|
||||
drupal_goto('user_import/' . $template_id);
|
||||
drupal_goto('admin/people/user_import/' . $template_id);
|
||||
}
|
||||
|
||||
$pager_id = 1;
|
||||
$max = 25;
|
||||
$import = _user_import_settings_select($import_id);
|
||||
$output = '';
|
||||
$file_lines = array();
|
||||
|
||||
$total = db_query('SELECT count(data) FROM {user_import_errors} WHERE :import_id = %d', array(':import_id' => $import['import_id']))->fetchField();
|
||||
$total = db_query('SELECT count(data) FROM {user_import_errors} WHERE import_id = :import_id', array(':import_id' => $import_id))->fetchField();
|
||||
|
||||
if (empty($total)) {
|
||||
|
||||
@@ -301,12 +300,13 @@ function user_import_limited_errors($import_id = NULL, $template_id = NULL) {
|
||||
array('data' => t('Errors'), 'field' => 'errors')
|
||||
);
|
||||
|
||||
$query = db_select('user_import_errors')
|
||||
$query = db_select('user_import_errors', 'uie')
|
||||
->fields('uie')
|
||||
->extend('PagerDefault')
|
||||
->extend('TableSort');
|
||||
|
||||
$query
|
||||
->condition('import_id', $import['import_id'])
|
||||
->condition('import_id', $import_id, '=')
|
||||
->limit($max)
|
||||
->orderByHeader($header);
|
||||
|
||||
@@ -317,10 +317,9 @@ function user_import_limited_errors($import_id = NULL, $template_id = NULL) {
|
||||
}
|
||||
|
||||
$output .= theme('user_import_errors_display', array('import' => $import, 'file_lines' => $file_lines, 'total' => $total));
|
||||
$output .= theme('pager', array('max' => $max, 'pager_id' => $pager_id));
|
||||
}
|
||||
|
||||
$output .= l(t('Return'), "user_import/$template_id/$import_id");
|
||||
$output .= l(t('Return'), "admin/people/user_import");
|
||||
|
||||
return $output;
|
||||
}
|
||||
@@ -331,7 +330,8 @@ function user_import_limited_errors($import_id = NULL, $template_id = NULL) {
|
||||
* @param null $template_id
|
||||
*/
|
||||
function user_import_limited_delete($import_id = NULL, $template_id = NULL) {
|
||||
user_import_delete($import_id, "user_import/$template_id");
|
||||
module_load_include('inc', 'user_import', 'user_import.admin');
|
||||
user_import_delete($import_id, "admin/people/user_import");
|
||||
}
|
||||
|
||||
// - - - - - - - - THEMES - - - - - - - -
|
||||
|
Reference in New Issue
Block a user