Commit e0feda08 authored by Leif Andersson's avatar Leif Andersson
Browse files

Added handling of mailinglists when email changes.

parent 5304073d
......@@ -62,7 +62,7 @@ foreach ($simpleFields as $key => $name) {
$place = $this->CreateInputText($id,$key,$person->$key,30);
$smarty->assign('input_'.$key,$place);
}
$smarty->assign('title_Andrad','Ändrad');
$smarty->assign('title_Andrad','Ändrad');
$smarty->assign('value_Andrad', $person->Andrad);
foreach ($areaFields as $key => $name) {
......@@ -89,13 +89,14 @@ if ($ID) {
$smarty->assign('groupsButton', $place);
$epost = $person->Epost;
$place = '';
foreach (Person::$firstFields as $field) {
if (isset($params[$field])) {
$place .= $this->CreateInputHidden($id, $field,$params[$field]);
}
}
$place .= $this->CreateInputHidden($id, 'oldEpost',$epost);
$smarty->assign('hidden',$place);
......
<?php
require_once 'lib/class.Group.php';
if (!isset($gCms)) exit;
// echo '<pre>'; print_r($params); echo '</pre>'; exit;
//echo '<pre>'; print_r($params); echo '</pre>'; exit;
if (! $this->CheckPermission('Use ReglerAddress')) {
return $this->DisplayErrorPage($id, $params, $returnid,
'ReglerAddress access denied.');
}
if (isset($params['doGroups'])) {
$paramsB = array();
foreach (Person::$firstFields as $field) {
......@@ -33,7 +36,7 @@ if (isset($params['cancelUpdate'])) {
if (isset($params['submit'])) {
$record = new Person($params);
echo '<pre>'; print_r($record); echo '</pre>';
//echo '<pre>'; print_r($record); echo '</pre>';
$record->updateRecord();
$paramsB['module_message'] = 'Adressinformation ändrad';
foreach (Person::$firstFields as $field) {
......@@ -41,6 +44,10 @@ if (isset($params['submit'])) {
$paramsB[$field] = $params[$field];
}
}
if (isset($params['oldEpost']) && isset($params['Epost'])) {
if ($params['oldEpost'] != $params['Epost']) Group::setMailLists();
}
$this->Redirect($id, 'defaultadmin', $returnid, $paramsB);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment