Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
login_dropdown.php
Go to the documentation of this file.
1 <?php
6 if (elgg_is_logged_in()) {
7  return true;
8 }
9 
10 $body = elgg_view_form('login', array(), array('returntoreferer' => TRUE));
11 ?>
12 <div id="login-dropdown">
13  <?php
14  echo elgg_view('output/url', array(
15  'href' => 'login#login-dropdown-box',
16  'rel' => 'popup',
17  'class' => 'elgg-button elgg-button-dropdown',
18  'text' => elgg_echo('login'),
19  ));
20  echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
21  ?>
22 </div>
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition: sessions.php:51
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1302
if(elgg_is_logged_in()) $body
Elgg drop-down login form.
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1207