MVC-Pro/application/controllers/logincontroller.php
/**
    * Description:
    * This logs in the user if the password is correct.  If not it spits out the error message.
    *
    * @return [type] [description]
    */
This logs in the user if the password is correct.  If not it spits out the error message.

@return [type] [description]
This logs in the user if the password is correct . If not it spits out the error message . @return [ type ] [ description ]
public function do_login()
    {
        $this->userObject = new User();
        $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);
        if ($uid) {
            $this->set('message', 'You logged in!');
            $user = $this->userObject->getUser($uid);
            unset($user['password']);
            unset($user[4]);
            $_SESSION['user'] = $user;
            header('Location: /index.php/');
        } else {
            $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');
        }
    }
public function do_login ( ) { $ this -> userObject = new User ( ) ; $ uid = $ this -> userObject -> checkUser ( $ _POST [ 'user_email' ] , $ _POST [ 'user_password' ] ) ; if ( $ uid ) { $ this -> set ( 'message' , 'You logged in!' ) ; $ user = $ this -> userObject -> getUser ( $ uid ) ; unset ( $ user [ 'password' ] ) ; unset ( $ user [ 4 ] ) ; $ _SESSION [ 'user' ] = $ user ; header ( 'Location: /index.php/' ) ; } else { $ this -> set ( 'error' , 'Sorry! Looks like something might be messed up with your Username or Password! :p' ) ; } }
Description:
 This logs in the user if the password is correct.
Description : This logs in the user if the password is correct .
// grab the uID of the person signing in // if the uID exists // grab the array of user-data from the database // leave out the password // if (strlen($_SESSION['redirect']i) > 0) {  // basically, if someone types in the url with the funciton after, //    // supposed to redirect people to the pages they want. //    $view = $_SESSION['redirect']; //    unset($_SESSION['redirect']); //    header('Location: ' . BASE_URL . $view); // make the SESSION  key 'user' and set it equal to the aray of user-data