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
2b8552b3
Commit
2b8552b3
authored
Jun 08, 2008
by
Nigel McNie
Browse files
Add 'log in as X' to the profile viewing page, to assist admins.
(cherry picked from commit
ea02642a
)
parent
df1bc647
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/theme/default/templates/user/view.tpl
View file @
2b8552b3
...
...
@@ -13,8 +13,11 @@
{
$introduction
}
<div
class=
"fr user-icon"
>
<img
src=
"
{
$WWWROOT
}
thumb.php?type=profileicon&maxwidth=100&maxheight=100&id=
{
$USERID
}
"
alt=
""
>
<div>
{
if
!
empty
(
$loginas
)
}
<div
class=
"center"
><strong><a
href=
"
{
$WWWROOT
}
admin/users/changeuser.php?id=
{
$USERID
}
"
>
{
$loginas
}
</a></strong></div>
{/
if
}
{
if
$canmessage
}
<br>
<a
href=
"
{
$WWWROOT
}
user/sendmessage.php?id=
{
$USERID
}
&returnto=view"
id=
"btn-sendmessage"
>
{
str
tag
=
'sendmessage'
section
=
'group'
}
</a>
{/
if
}
{
if
$relationship
==
'existingfriend'
}
...
...
@@ -32,6 +35,7 @@
{
if
$addform
}
{
$addform
}
{/
if
}
</div>
</div>
<ul
id=
"user-info"
>
{
foreach
from
=
$USERFIELDS
name
=
userfields
key
=
key
item
=
item
}
...
...
htdocs/user/view.php
View file @
2b8552b3
...
...
@@ -331,6 +331,13 @@ if ($loggedinid != $userid) {
}
if
(
$id
!=
$USER
->
get
(
'id'
)
&&
is_null
(
$USER
->
get
(
'parentuser'
)))
{
$loginas
=
get_string
(
'loginasuser'
,
'admin'
,
$user
->
username
);
}
else
{
$loginas
=
null
;
}
$smarty
->
assign
(
'loginas'
,
$loginas
);
if
(
isset
(
$introduction
))
{
$smarty
->
assign
(
'introduction'
,
$introduction
);
}
...
...
Write
Preview
Supports
Markdown
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