# SWDB

# application/actionlogin.php

File for the login action.

Implements an action function to be called from the {@see Controller}.

Package
  \Default

## Tags

category | Action

## Functions

### action()

    action(resource  $db = null) : integer

Logs the user in.

Reads the POST parameters looking for the following KEYS: uname password If there is a match, it sets cookies and session variables, and redirects to the user homepage.

#### Parameters

resource | $db | Database connection.

#### Returns

integer —

0 on success, negative values on error.

#

File
  application/action/login.php

## Tags

package | Default
category | Action

###