Elgg  Version 2.3
Go to the documentation of this file.
1 <?php
6 if (elgg_is_logged_in()) {
7  return true;
8 }
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' => elgg_get_login_url([], '#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>
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:1345
elgg_get_login_url(array $query=[], $fragment= '')
Returns site&#39;s login URL Triggers a &#39;login_url&#39;, &#39;site&#39; plugin hook that can be used by plugins to al...
Definition: users.php:426
if(elgg_is_logged_in()) $body
Elgg drop-down login form.
fieldset div
Definition: admin.css.php:485
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250