aboutsummaryrefslogtreecommitdiff
path: root/views/default/account/forms/register.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:51:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:51:32 +0000
commit08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f (patch)
tree75fd0261d5f92442fae934a58a9404bc3ed162f1 /views/default/account/forms/register.php
parent36ef345eb6425106f061fb866d9fa66d051e16df (diff)
downloadelgg-08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f.tar.gz
elgg-08d3f7f2820ed971ce5171c9ce9e15dbf452cf3f.tar.bz2
Merged 5605:5622 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5623 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/account/forms/register.php')
-rw-r--r--views/default/account/forms/register.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index b46e9df0b..580922eb7 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -13,7 +13,9 @@ $email = get_input('e');
$name = get_input('n');
$admin_option = false;
-if (($_SESSION['user']->isAdmin()) && ($vars['show_admin'])) {
+$loggedin_user = get_loggedin_user();
+
+if ($loggedin_user && $loggedin_user->isAdmin() && isset($vars['show_admin'])) {
$admin_option = true;
}
@@ -47,4 +49,4 @@ $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value
</div>
<script type="text/javascript">
$(document).ready(function() { $('input[name=name]').focus(); });
-</script> \ No newline at end of file
+</script>