MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/silverkeyhomesinc.ca/dev_admin_dawncs/app/Controller/
File Upload :
Current < : /hermes/bosweb/b1705/silverkeyhomesinc.ca/dev_admin_dawncs/app/Controller/UserBanksController.php

<?php
App::uses('AppController', 'Controller');

class UserBanksController extends AppController {
	public $components = array('Paginator', 'Session', 'Flash');

	public function beforeFilter()
	{
		parent::beforeFilter();
		$this->Auth->allow();
	}

	public function admin_add($token = null) {

		if ($token == $this->Auth->user('token')) {
			pr($token);
			if ($this->request->is('post')) {
				$this->UserBank->create();
				if ($this->UserBank->save($this->request->data)) {
					$this->Flash->success(__('The Bank Detail has been saved.'));
					return $this->redirect(array('action' => 'index'));
				} else {
					$this->Flash->error(__('The vendor could not be saved. Please, try again.'));
				}
			}
		}
		 else {
		 	$this->Auth->logout();
		 }





	}

}