phpBB

Development Wiki

Difference between revisions of "Function.login box"

From phpBB Development Wiki

(login_box)
(No difference)

Revision as of 20:14, 10 September 2008

login_box –– Generate login box or verify password

This article is a stub. You can help in improving Olympus Documentation by expanding it.


Description

  1. void login_box ( [ $redirect [, $l_explain [, $l_success [, $admin [, $s_display ]]]]] )

The login_box() function can have a redirect as the first parameter. As a rule of thumb, specify an empty string if you want to redirect to the users current location, else do not add the $SID to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).

Parameters

Parameter Usage
redirect --
l_explain --
l_success --
admin --
s_display --

Return Values

This function returns NULL if the user is banned

Examples

Example #1 Show the login box if user is not logged in

if (!$user->data['user_type'] == ANONYMOUS)
{
    
login_box('''LOGIN');
}

See Also