mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
mass account de/activation or quota setting
This commit is contained in:
parent
f7a9c20e1d
commit
e9604992a7
@ -85,7 +85,8 @@ class admin_passwordreset
|
||||
$msg = lang('You need to select some users first!');
|
||||
}
|
||||
elseif (!$content['random_pw'] && !$content['hash'] && !$content['notify'] &&
|
||||
(string)$content['changepassword'] === '' && (string)$content['mustchangepassword'] === '')
|
||||
(string)$content['changepassword'] === '' && (string)$content['mustchangepassword'] === '' &&
|
||||
(string)$content['mail']['activate'] === '' && (string)$content['mail']['quota'] === '')
|
||||
{
|
||||
$msg = lang('You need to select as least one action!');
|
||||
}
|
||||
@ -181,6 +182,29 @@ class admin_passwordreset
|
||||
': '.strip_tags(str_replace('<p>',"\n",$send->ErrorInfo))."\n";
|
||||
}
|
||||
}
|
||||
if ((string)$content['mail']['activate'] !== '' || (string)$content['mail']['quota'] !== '')
|
||||
{
|
||||
if (!isset($emailadmin))
|
||||
{
|
||||
$emailadmin = new emailadmin_bo();
|
||||
}
|
||||
if (($userData = $emailadmin->getUserData ($account_id)))
|
||||
{
|
||||
if ((string)$content['mail']['activate'] !== '')
|
||||
{
|
||||
$userData['accountStatus'] = $content['mail']['activate'] ? 'active' : '';
|
||||
}
|
||||
if ((string)$content['mail']['quota'] !== '')
|
||||
{
|
||||
$userData['quotaLimit'] = $content['mail']['quota'];
|
||||
}
|
||||
$emailadmin->saveUserData($account_id, $userData);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg .= lang('No profile defined for user %1', '#'.$account_id.' '.$account['account_fullname']);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($changed)
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application admin
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2012-07-03 16:00
|
||||
* generated by soetemplate::dump4setup() 2013-04-05 14:50
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package admin
|
||||
@ -93,7 +93,7 @@ $templ_data[] = array('name' => 'admin.customtranslation','template' => '','lang
|
||||
|
||||
$templ_data[] = array('name' => 'admin.export_users_csv_selectors','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:14:"select-account";s:4:"size";s:10:"All,groups";s:5:"label";s:5:"Group";s:4:"name";s:8:"group_id";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:9:"selection";s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1302620448',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.passwordreset','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"c5";s:4:",top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Select users";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:2:"15";s:4:"name";s:5:"users";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:8:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"5";s:5:"label";s:7:"Actions";i:1;a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:21:"Set a random password";s:4:"name";s:9:"random_pw";}i:2;a:5:{s:4:"type";s:11:"select-bool";s:4:"size";s:15:"Leave unchanged";s:5:"label";s:36:"Must change password upon next login";s:4:"name";s:18:"mustchangepassword";s:8:"onchange";s:85:"if (this.value==\'1\') document.getElementById(form::name(\'changepassword\')).value=\'1\';";}i:3;a:5:{s:4:"type";s:11:"select-bool";s:4:"size";s:15:"Leave unchanged";s:5:"label";s:19:"Can change password";s:4:"name";s:14:"changepassword";s:8:"onchange";s:136:"var mustchange=document.getElementById(form::name(\'mustchangepassword\')); if (this.value==\'0\' && mustchange.value) mustchange.value=\'0\';";}i:4;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"size";s:15:"Leave unchanged";s:4:"name";s:4:"hash";s:5:"label";s:23:"Change password hash to";}i:2;a:5:{s:4:"type";s:4:"text";s:5:"label";s:12:"Current hash";s:4:"name";s:12:"current_hash";s:4:"span";s:14:",leftPad5 gray";s:8:"readonly";s:1:"1";}}i:5;a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:20:"Notify user by email";s:4:"name";s:6:"notify";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:17:"Notification mail";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"64";s:4:"name";s:7:"subject";s:4:"blur";s:7:"Subject";}i:2;a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"15,64";s:4:"name";s:4:"body";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:22:"Available placeholders";}i:2;a:6:{s:4:"type";s:4:"grid";s:4:"span";s:5:",gray";s:4:"name";s:12:"replacements";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:5:"Start";s:4:"name";s:5:"start";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:12:"Download CSV";s:4:"name";s:12:"download_csv";}}}s:4:"rows";i:6;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1301655701',);
|
||||
$templ_data[] = array('name' => 'admin.passwordreset','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"c5";s:4:",top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Select users";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:2:"15";s:4:"name";s:5:"users";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:9:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"6";s:5:"label";s:7:"Actions";i:1;a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:21:"Set a random password";s:4:"name";s:9:"random_pw";}i:2;a:5:{s:4:"type";s:11:"select-bool";s:4:"size";s:15:"Leave unchanged";s:5:"label";s:36:"Must change password upon next login";s:4:"name";s:18:"mustchangepassword";s:8:"onchange";s:85:"if (this.value==\'1\') document.getElementById(form::name(\'changepassword\')).value=\'1\';";}i:3;a:5:{s:4:"type";s:11:"select-bool";s:4:"size";s:15:"Leave unchanged";s:5:"label";s:19:"Can change password";s:4:"name";s:14:"changepassword";s:8:"onchange";s:136:"var mustchange=document.getElementById(form::name(\'mustchangepassword\')); if (this.value==\'0\' && mustchange.value) mustchange.value=\'0\';";}i:4;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"size";s:15:"Leave unchanged";s:4:"name";s:4:"hash";s:5:"label";s:23:"Change password hash to";}i:2;a:5:{s:4:"type";s:4:"text";s:5:"label";s:12:"Current hash";s:4:"name";s:12:"current_hash";s:4:"span";s:14:",leftPad5 gray";s:8:"readonly";s:1:"1";}}i:5;a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:20:"Notify user by email";s:4:"name";s:6:"notify";}i:6;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:11:"select-bool";s:4:"name";s:14:"mail[activate]";s:4:"size";s:15:"Leave unchanged";s:5:"label";s:21:"Activate mail account";}i:2;a:4:{s:4:"type";s:3:"int";s:4:"name";s:11:"mail[quota]";s:5:"label";s:10:"Quota (MB)";s:4:"help";s:20:"|empty to NOT change";}}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:17:"Notification mail";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"64";s:4:"name";s:7:"subject";s:4:"blur";s:7:"Subject";}i:2;a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"15,64";s:4:"name";s:4:"body";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:22:"Available placeholders";}i:2;a:6:{s:4:"type";s:4:"grid";s:4:"span";s:5:",gray";s:4:"name";s:12:"replacements";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:5:"Start";s:4:"name";s:5:"start";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:12:"Download CSV";s:4:"name";s:12:"download_csv";}}}s:4:"rows";i:6;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1301655701',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.remotes','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:2:"h2";s:9:",!@remote";s:2:"h1";s:6:",!@msg";s:2:"h3";s:2:",1";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"remote";s:4:"span";s:10:"all,border";s:4:"name";s:18:"admin.remotes.edit";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:26:"admin.remotes.header_right";}}i:4;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:18:"admin.remotes.rows";}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.border { border: black solid 2px; }','modified' => '1195926693',);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@msg">
|
||||
<description span="all" class="redItalic" id="msg"/>
|
||||
<description id="msg" span="all" class="redItalic"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
@ -17,7 +17,7 @@
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
<listbox type="select-account" rows="15" id="users"/>
|
||||
<listbox type="select-account" id="users" rows="15"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
@ -25,29 +25,35 @@
|
||||
<caption label="Actions"/>
|
||||
<checkbox label="Set a random password" id="random_pw"/>
|
||||
<menulist>
|
||||
<menupopup type="select-bool" options="Leave unchanged" label="Must change password upon next login" id="mustchangepassword" onchange="if (this.value=='1') document.getElementById(form::name('changepassword')).value='1';"/>
|
||||
<menupopup type="select-bool" label="Must change password upon next login" id="mustchangepassword" onchange="if (this.value=='1') document.getElementById(form::name('changepassword')).value='1';" options="Leave unchanged"/>
|
||||
</menulist>
|
||||
<menulist>
|
||||
<menupopup type="select-bool" options="Leave unchanged" label="Can change password" id="changepassword" onchange="var mustchange=document.getElementById(form::name('mustchangepassword')); if (this.value=='0' && mustchange.value) mustchange.value='0';"/>
|
||||
<menupopup type="select-bool" label="Can change password" id="changepassword" onchange="var mustchange=document.getElementById(form::name('mustchangepassword')); if (this.value=='0' && mustchange.value) mustchange.value='0';" options="Leave unchanged"/>
|
||||
</menulist>
|
||||
<hbox options="0,0">
|
||||
<menulist>
|
||||
<menupopup options="Leave unchanged" id="hash" label="Change password hash to"/>
|
||||
<menupopup label="Change password hash to" id="hash" options="Leave unchanged"/>
|
||||
</menulist>
|
||||
<textbox label="Current hash" id="current_hash" class="leftPad5 gray" readonly="true"/>
|
||||
<textbox label="Current hash" id="current_hash" readonly="true" class="leftPad5 gray"/>
|
||||
</hbox>
|
||||
<checkbox label="Notify user by email" id="notify"/>
|
||||
<hbox>
|
||||
<menulist>
|
||||
<menupopup type="select-bool" label="Activate mail account" id="mail[activate]" options="Leave unchanged"/>
|
||||
</menulist>
|
||||
<textbox type="integer" statustext="|empty to NOT change" label="Quota (MB)" id="mail[quota]"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<description/>
|
||||
</row>
|
||||
<row valign="top">
|
||||
<groupbox>
|
||||
<caption label="Notification mail"/>
|
||||
<textbox size="64" id="subject" blur="Subject"/>
|
||||
<textbox multiline="true" rows="15" cols="64" id="body"/>
|
||||
<textbox blur="Subject" id="subject" size="64"/>
|
||||
<textbox multiline="true" id="body" rows="15" cols="64"/>
|
||||
</groupbox>
|
||||
<vbox>
|
||||
<description class="gray" value="Available placeholders"/>
|
||||
<description value="Available placeholders" class="gray"/>
|
||||
<grid id="replacements">
|
||||
<columns>
|
||||
<column/>
|
||||
|
Loading…
Reference in New Issue
Block a user