Example #1
0
 public function __construct($fileName)
 {
     // *** Open up the file
     $this->image = $this->openImage($fileName);
     logr($this->image, 'openIMage');
     // *** Get width and height
     $this->width = imagesx($this->image);
     $this->height = imagesy($this->image);
     // *** Get EXIF data if the exif module is installed
     if (function_exists('read_exif_data')) {
         $this->exif = read_exif_data($fileName);
     } else {
         error_log("Please install the exif module in order to support image orientation");
     }
 }
 public function postAuthenticate()
 {
     $login = $_REQUEST['user_email'];
     $pass = $_REQUEST['user_password'];
     $Validate = new Validate();
     $rules = array('user_email' => array('reqd' => 'Please provide a user name'), 'user_password' => array('reqd' => 'Please provide a password'));
     $validation = $Validate->run($_REQUEST, $rules);
     if (is_array($validation)) {
         return Redirect::route('login')->with('validation', $validation);
     }
     $md5pass = md5($pass);
     $authed = User::authenticateUser($login, $md5pass);
     if (is_object($authed)) {
         if (isset($_REQUEST['remember'])) {
             Cookie::queue('_user_remember', Crypt::encrypt($login . ':' . $md5pass), 9999999);
         }
         Session::put('user', $authed);
         return Redirect::action('PortalController@getIndex');
     } else {
         logr(array('data' => $_REQUEST, 'time' => date('Y-m-d H:i:s')), 'failed-logins');
         return Redirect::route('login')->with('validation', array('authentication' => 'There seems to be a problem with your email or password'));
     }
 }