login_session
login_session
Logs in a session. Returns a structure containing info about the
login operation.
Not generally called by the user.
This is not generally called by user. It is employed by the login_form element type.
login_session(session,username,password)
Parameters:
| Parameter |
Type |
Description |
| session |
cloudsession |
The session to affect. this is a "cloudsession" object |
| username user |
string |
id of the user |
| password |
string |
entered password
|
Returned Value:
| Type |
Description |
| structure |
with components :
| Component |
Type |
Description |
| logged_in | boolean | says if login was successful or not |
| login_error | string | set if login failed. gives the error message |
| user_name | string | set if login succeeded. name of the user |
| user_email | string | set set if login succeeded and there is a user email (if any) |
| user_organization | string | set if login succeeded and there is a: string name of the user's organization i.e. company |
| user_id | string | set if login succeeded. id of the user |
| user_type | string | set if login succeeded. type of the user |
| user_is_admin | boolean | set if login succeeded. true if the logged in user is an admin. false otherwise |
|
Examples
info = login_session(session,username,password)