Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
03ba33da
Commit
03ba33da
authored
Jan 15, 2008
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow admin to change users' account expiry date
parent
0f8d3d63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
htdocs/admin/users/edit.php
htdocs/admin/users/edit.php
+10
-1
htdocs/lang/en.utf8/admin.php
htdocs/lang/en.utf8/admin.php
+2
-0
No files found.
htdocs/admin/users/edit.php
View file @
03ba33da
...
...
@@ -100,6 +100,7 @@ function edituser_unsuspend_submit(Pieform $form, $values) {
// Site-wide account settings
$currentdate
=
getdate
();
$elements
=
array
();
$elements
[
'id'
]
=
array
(
'type'
=>
'hidden'
,
...
...
@@ -131,6 +132,14 @@ if ($USER->get('admin')) {
'defaultvalue'
=>
$user
->
admin
,
);
}
$elements
[
'expiry'
]
=
array
(
'type'
=>
'date'
,
'title'
=>
get_string
(
'accountexpiry'
,
'admin'
),
'description'
=>
get_string
(
'accountexpirydescription'
,
'admin'
),
'minyear'
=>
$currentdate
[
'year'
]
-
2
,
'maxyear'
=>
$currentdate
[
'year'
]
+
20
,
'defaultvalue'
=>
$user
->
expiry
);
$elements
[
'quota'
]
=
array
(
'type'
=>
'bytes'
,
'title'
=>
get_string
(
'filequota'
,
'admin'
),
...
...
@@ -199,6 +208,7 @@ function edituser_site_submit(Pieform $form, $values) {
}
$user
->
passwordchange
=
(
int
)
(
$values
[
'passwordchange'
]
==
'on'
);
$user
->
quota
=
$values
[
'quota'
];
$user
->
expiry
=
db_format_timestamp
(
$values
[
'expiry'
]);
global
$USER
;
if
(
$USER
->
get
(
'admin'
))
{
// Not editable by institutional admins
...
...
@@ -257,7 +267,6 @@ $elements = array(
);
$allinstitutions
=
get_records_assoc
(
'institution'
);
$currentdate
=
getdate
();
foreach
(
$user
->
get
(
'institutions'
)
as
$i
)
{
$elements
[
$i
->
institution
.
'_settings'
]
=
array
(
'type'
=>
'fieldset'
,
...
...
htdocs/lang/en.utf8/admin.php
View file @
03ba33da
...
...
@@ -262,6 +262,8 @@ $string['sitestaffdescription'] = 'If checked, the user can create controlled Co
$string
[
'siteadmins'
]
=
'Site Admins'
;
$string
[
'siteadmin'
]
=
'Site administrator'
;
$string
[
'siteadmindescription'
]
=
'Site administrators can to do anything and go anywhere on the site'
;
$string
[
'accountexpiry'
]
=
'Account expires'
;
$string
[
'accountexpirydescription'
]
=
'Date on which the user\'s login is automatically disabled.'
;
$string
[
'suspended'
]
=
'Suspended'
;
$string
[
'suspendedreason'
]
=
'Reason for suspension'
;
$string
[
'suspendedreasondescription'
]
=
'The text that will be displayed to the user on their next login attempt.'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment