Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b74c58b3
Commit
b74c58b3
authored
Jun 06, 2014
by
Yuliya Bozhko
Committed by
Gerrit Code Review
Jun 06, 2014
Browse files
Merge "Adding 'success' messages for admin/users/edit.php (Bug #1314416)"
parents
63a1da59
8aa074c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/users/edit.php
View file @
b74c58b3
...
...
@@ -519,7 +519,7 @@ function edituser_site_submit(Pieform $form, $values) {
}
}
db_commit
();
$SESSION
->
add_ok_msg
(
get_string
(
'usersitesettingschanged'
,
'admin'
));
redirect
(
'/admin/users/edit.php?id='
.
$user
->
id
);
}
...
...
@@ -739,7 +739,7 @@ function edituser_institution_submit(Pieform $form, $values) {
}
$userinstitutions
=
$user
->
get
(
'institutions'
);
global
$USER
;
global
$USER
,
$SESSION
;
foreach
(
$userinstitutions
as
$i
)
{
if
(
$USER
->
can_edit_institution
(
$i
->
institution
))
{
if
(
isset
(
$values
[
$i
->
institution
.
'_submit'
]))
{
...
...
@@ -762,13 +762,17 @@ function edituser_institution_submit(Pieform $form, $values) {
}
handle_event
(
'updateuser'
,
$user
->
id
);
db_commit
();
$SESSION
->
add_ok_msg
(
get_string
(
'userinstitutionupdated'
,
'admin'
,
$i
->
displayname
));
break
;
}
else
if
(
isset
(
$values
[
$i
->
institution
.
'_remove'
]))
{
}
else
if
(
isset
(
$values
[
$i
->
institution
.
'_remove'
]))
{
if
(
$user
->
id
==
$USER
->
id
)
{
$USER
->
leave_institution
(
$i
->
institution
);
}
else
{
}
else
{
$user
->
leave_institution
(
$i
->
institution
);
}
$SESSION
->
add_ok_msg
(
get_string
(
'userinstitutionremoved'
,
'admin'
,
$i
->
displayname
));
// Institutional admins can no longer access this page
// if they remove the user from the institution, so
// send them back to user search.
...
...
@@ -792,6 +796,8 @@ function edituser_institution_submit(Pieform $form, $values) {
else
{
$user
->
join_institution
(
$values
[
'addinstitution'
]);
}
$userinstitutions
=
$user
->
get
(
'institutions'
);
$SESSION
->
add_ok_msg
(
get_string
(
'userinstitutionjoined'
,
'admin'
,
$userinstitutions
[
$values
[
'addinstitution'
]]
->
displayname
));
}
redirect
(
'/admin/users/edit.php?id='
.
$user
->
id
);
...
...
htdocs/lang/en.utf8/admin.php
View file @
b74c58b3
...
...
@@ -768,7 +768,11 @@ $string['usereditwarning'] = 'NOTE: Saving the account changes will cause the us
$string
[
'suspenduserdescription'
]
=
'A suspended user is unable to log in until the account is unsuspended.'
;
$string
[
'deleteusernote'
]
=
'Please note that this operation <strong>cannot be undone</strong>.'
;
$string
[
'youcannotadministerthisuser'
]
=
'You cannot administer this user.'
;
$string
[
'userinstitutionjoined'
]
=
'User added to institution "%s".'
;
$string
[
'userinstitutionremoved'
]
=
'User removed from institution "%s".'
;
$string
[
'userinstitutionupdated'
]
=
'User settings for institution "%s" updated.'
;
$string
[
'usernamechangenotallowed'
]
=
'The chosen authentication method does not allow changes to the username.'
;
$string
[
'usersitesettingschanged'
]
=
'Site account settings updated.'
;
$string
[
'passwordchangenotallowed'
]
=
'The chosen authentication method does not allow changes to the password.'
;
$string
[
'thisuserdeleted'
]
=
'This user has been deleted.'
;
$string
[
'disableemail'
]
=
'Disable email'
;
...
...
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