Subversion Repositories SmartDukaan

Rev

Rev 13685 | Rev 13739 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13685 Rev 13736
Line 73... Line 73...
73
    function afterFilter() {
73
    function afterFilter() {
74
		$result['ucadcode'] = $this->ucadcode;
74
		$result['ucadcode'] = $this->ucadcode;
75
    }
75
    }
76
 
76
 
77
    function beforeRender() {   
77
    function beforeRender() {   
-
 
78
    	$logged_user = $this->Auth->user();
78
    	$this->set('logged_user', $this->Auth->user()); 	
79
    	$this->set('logged_user', $logged_user); 	
79
        $this->set('base_url', 'http://' . $_SERVER['SERVER_NAME'] . Router::url('/'));
80
        $this->set('base_url', 'http://' . $_SERVER['SERVER_NAME'] . Router::url('/'));
-
 
81
    }
-
 
82
 
-
 
83
    function checkMobileNumber() {
-
 
84
    	$logged_user = $this->Auth->user();
-
 
85
    	if(empty($logged_user['mobile_verified']) && $this->params['controller'] !='users') {
-
 
86
			$skipmobileverification = $this->Session->read('skipmobileverification');
-
 
87
			if(!isset($skipmobileverification) || empty($skipmobileverification)) {
80
        // $this->set('base_url', 'http://api.profittill.com/');
88
				$this->redirect('/users/verifymobile');
-
 
89
			}
-
 
90
		}
81
    }
91
    }
82
 
92
 
83
    function getallheaders() { 
93
    function getallheaders() { 
84
	   $headers = ''; 
94
	   $headers = ''; 
85
       foreach ($_SERVER as $name => $value) 
95
       foreach ($_SERVER as $name => $value)