Login API
For a list of examples see the Login Overview.
Type
login (default)
Opens an iframe asking for the user's username and password. Also includes 'forgot password' link and 'create an account' link.
If the user is already logged in, a login link will not be shown. If the following show tags are used, they will be displayed instead.
Tag | Description |
__logout__ | Creates a link to /logout/ The user will be taken to the address specified afterwards. So /logout/foo/ would log the user out and take them to the page /foo/ |
__username__ | The username of the logged in member |
__firstname__ | The members first name |
__fullname__ | The members full name |
Display Modes
box
For type:login only. Will embed the iframe directly in the page.
Example:
"display:box",
popup
Will display a link which will open in an iframe over the current page.
Example:
"display:popup",
Parameters
success
Where the user will be directed to upon successful completion. If not specified, the users is returned to the current page.
Example:
"success:/me/",
style
Specify a custom stylesheet for the iframe to use.
Example:
"style:http://example.com/css/external.css",
label
Defines what appears in the login anchor. Default is "Login". Images can be used.
Examples:
"label:Click Here to Login",
"label:/img/example.jpg",
createlink
Specify if the link to create an account should be shown. Default is yes.
Example:
"createlink:no",
addNewUserToGroup
A list of group slugs. For the login window, if a user chooses to create a new account instead of logging in, they will be added to the groups listed.
Example:
"addNewUserToGroup:group-slug1,group-slug2",