Subversion Repositories SmartDukaan

Rev

Rev 14457 | Rev 15348 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
 
3
class Auth extends MY_Controller {
4
 
5
public $layoutName ='';
6
 
7
	function __construct() {
8
 
9
		// Call the CI_controller constructor
10
		parent::__construct();
11108 lgm 11
		// $admin = $this->session->userdata('admin');
12
		// if(!isset($admin) || empty($admin)) {
13
		// 	redirect(base_url().'authorize');
14
		// }
10582 lgm 15
		$this->output->set_header("HTTP/1.0 200 OK");
16
		$this->output->set_header("HTTP/1.1 200 OK");
17
		$this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s',time()).' GMT');
18
		$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");
19
		$this->output->set_header("Cache-Control: post-check=0, pre-check=0");
20
		$this->output->set_header("Pragma: no-cache");
21
		$this->layout->setlayout('layout/layout_main');
22
		$this->load->model('oauth_model');
23
		$this->layoutName= $this->layout->getLayout();
24
		$this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
25
 
26
 
27
 
28
	}
29
	public function index()
30
	{
31
		$this->__oauthorization();
32
 
33
 
34
	}
35
	function __oauthorization()
36
	{
37
		//sample session storage.. later i will imporve security for login 
38
		$check =$this->session->userdata('authorize');
39
		if(isset($check) and !empty($check) and $check['authority']='success')
40
		{
41
			redirect(base_url().'home');
42
		}
43
		else
44
		{
45
			$this->login();
46
		}	
47
 
48
 
49
	}
50
	function login()
51
	{
52
		//standard array
53
		$data = array();
54
		 if (isset($_SERVER['HTTP_REFERER'])) {
55
			if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
56
   				$redirect = $_SERVER['HTTP_REFERER'];
57
   				$location = $this->session->userdata('location');
58
   				if(isset($location) && $location == 'shipping'){
59
   					$data['location'] = 'shipping';
60
   					$location = base_url().$location;
61
   					$this->session->set_userdata('location',$location);
11520 lgm 62
   				}elseif(isset($location) && ($location == 'my-recharges' || $location == 'my-wallet')){
63
   					$location = base_url().$location;
64
   					$this->session->set_userdata('location',$location);
10582 lgm 65
   				}else{
66
   					$this->session->set_userdata('location',$redirect);	
67
   				}
68
 
69
			}
70
		}
71
		$authorized = $this->session->userdata('authorized');
72
		if(isset($authorized) && !empty($authorized) && $authorized['isLoggedIn'] == 1){
73
			redirect(base_url().'home');
74
		}
75
		//get cache 
76
		$authorized = $this->session->userdata('authorized');
77
		if(isset($_POST) && !empty($_POST)){
78
			if(isset($authorized) && !empty($authorized)){
79
				$_POST['userId'] = $authorized['Id'];
80
				$_POST['cartId'] = $authorized['cartId'];
81
				if($authorized['isLoggedIn'] == 1){
82
					$_POST['isLoggedIn'] = 'true';
83
				}
84
				elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
85
				$_POST['isLoggedIn'] = 'false';
86
				}
87
			}
11049 lgm 88
			//end of get cache
11171 lgm 89
			$configdata =array();
90
			$configdata = $this->config->item('oauth_login');
91
			unset($configdata['response'][0]);
92
			$data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata);
14012 anikendra 93
			error_log(print_r($data['response']['response'],1));
11049 lgm 94
			//set cache to output or renew cache
95
			if(isset($data['response']['response']['login']['authorized']))
10582 lgm 96
			{
11049 lgm 97
				$this->session->set_userdata('authorized',$data['response']['response']['login']['authorized']);
98
				//$this->session->set_flashdata(array('msg'=>$data['response']['response']['login']['msg']));
99
				$location = $this->session->userdata('location');
100
				if(isset($location) && !empty($location)){
101
					$this->session->unset_userdata('location');
102
					redirect($location);
10582 lgm 103
				}
11049 lgm 104
				else{
105
					redirect(base_url().$data['response']['response']['login']['redirect']);	
106
				}
107
 
108
 
10582 lgm 109
			}
11049 lgm 110
			else
111
			{
112
				$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
113
				$data['title'] = 'Saholic';
114
				$data['stylesheet'] = 'auth.css';
115
				$this->layout->view(strtolower(__CLASS__).'/oauth_view',$data);
10582 lgm 116
			}
117
		}
11049 lgm 118
		else{
11171 lgm 119
			$configdata =array();
120
			$configdata = $this->config->item('oauth_login');
121
			unset($configdata['response'][1]);
122
			$cachemodule = array('header','footer','response');
123
			$configdata = getCache($configdata,$cachemodule);
11049 lgm 124
			$data = array();
11171 lgm 125
			$data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata['module']);
10582 lgm 126
			$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
11012 lgm 127
			$data['title'] = 'Saholic';
10582 lgm 128
			$data['stylesheet'] = 'auth.css';
11171 lgm 129
			if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
130
			{
131
				foreach($cachemodule as $cm)
132
				{
133
					if(isset($configdata[$cm]) and !empty($configdata[$cm]))
134
					{
135
						$data['response'][$cm]=$configdata[$cm];
136
					}
137
				}
138
			}
139
			setCache($configdata['module'],$cachemodule,$data['response']);
11049 lgm 140
			$this->layout->view(strtolower(__CLASS__).'/login',$data);
10582 lgm 141
		}
142
	}
143
	function signup()
144
	{
145
		//standard array
146
		$authorized = $this->session->userdata('authorized');
147
		if(isset($authorized) && !empty($authorized) && $authorized['isLoggedIn'] == 1){
148
			redirect(base_url().'home');
149
		}
150
		$data = array();
151
		if (isset($_SERVER['HTTP_REFERER'])) {
152
			if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
153
   				$redirect = $_SERVER['HTTP_REFERER'];
154
   				$location = $this->session->userdata('location');
155
   				if(isset($location) && $location == 'shipping'){
156
   					$data['location'] = 'shipping';
157
   					$this->session->set_userdata('location',$location);
11520 lgm 158
   				}elseif(isset($location) && ($location == 'my-recharges' || $location == 'my-wallet')){
159
   					$location = base_url().$location;
160
   					$this->session->set_userdata('location',$location);
10582 lgm 161
   				}else{
162
   					$this->session->set_userdata('location',$redirect);	
163
   				}
164
			}
165
		}
166
		//get cache 
167
		$authorized = $this->session->userdata('authorized');
168
		if(isset($_POST) && !empty($_POST)){
169
			if(isset($authorized) && !empty($authorized)){
170
				$_POST['userId'] = $authorized['Id'];
171
				$_POST['Id'] = $authorized['cartId'];
172
				if($authorized['isLoggedIn'] == 1){
173
					$_POST['isLoggedIn'] = 'true';
174
				}
175
				elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
176
					$_POST['isLoggedIn'] = 'false';
177
				}
178
			}
11049 lgm 179
 
11171 lgm 180
			$configdata =array();
181
			$configdata = $this->config->item('oauth_signup');
182
			unset($configdata['response'][0]);
183
			$data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata);
14012 anikendra 184
			error_log(print_r($data['response']['response'],1));
11049 lgm 185
			//set cache to output or renew cache
186
			if(isset($data['response']['response']['signup']['authorized']))
10582 lgm 187
			{
11049 lgm 188
				$this->session->set_userdata('authorized',$data['response']['response']['signup']['authorized']);
189
				$this->session->set_flashdata(array('msg'=>$data['response']['response']['signup']['msg']));
190
				$location = $this->session->userdata('location');
191
				if(isset($location) && !empty($location)){
192
					$this->session->unset_userdata('location');
193
					redirect($location);
10582 lgm 194
				}
11049 lgm 195
				redirect(base_url().$data['response']['response']['signup']['redirect']);
10582 lgm 196
			}
11049 lgm 197
			else
198
			{
199
				$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
200
				$data['title'] = 'Saholic';
201
				$data['stylesheet'] = 'auth.css';
202
				$this->layout->view(strtolower(__CLASS__).'/oauth_view',$data);
10582 lgm 203
			}
11049 lgm 204
		}else{
11171 lgm 205
			$configdata =array();
206
			$configdata = $this->config->item('oauth_signup');
207
			unset($configdata['response'][1]);
208
			$cachemodule = array('header','footer','response');
209
			$configdata = getCache($configdata,$cachemodule);
11049 lgm 210
			$data = array();
11171 lgm 211
			$data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata['module']);
10582 lgm 212
			$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
11012 lgm 213
			$data['title'] = 'Saholic';
10582 lgm 214
			$data['stylesheet'] = 'auth.css';
11171 lgm 215
			if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
216
			{
217
				foreach($cachemodule as $cm)
218
				{
219
					if(isset($configdata[$cm]) and !empty($configdata[$cm]))
220
					{
221
						$data['response'][$cm]=$configdata[$cm];
222
					}
223
				}
224
			}
225
			setCache($configdata['module'],$cachemodule,$data['response']);
11049 lgm 226
			$this->layout->view(strtolower(__CLASS__).'/signup',$data);
10582 lgm 227
		}
228
	}
229
	function logout()
230
	{
231
 
232
		$authorized = $this->session->userdata('authorized');
233
		if(isset($authorized) and !empty($authorized))
234
		{
235
			$this->session->unset_userdata('authorized');
236
			$this->session->unset_userdata('addressId');
237
			$this->session->unset_userdata('hotspotId');
238
			$this->session->unset_userdata('cod');
11412 lgm 239
			$this->session->unset_userdata('userId');
240
			$this->session->unset_userdata('captcha');
10582 lgm 241
			redirect(base_url().'home');
242
 
243
		}
244
	}
11677 lgm 245
 
246
	function changePassword()
247
  {
248
    //standard array
249
    $data = array();
250
    $authorized = $this->session->userdata('authorized');
251
    // if(isset($authorized) && !empty($authorized) && $authorized['isLoggedIn'] == 1){
252
      // redirect(base_url().'home');
253
    // }
254
    //get cache 
255
    $authorized = $this->session->userdata('authorized');
256
    if(isset($_POST) && !empty($_POST)){
257
      // print_r($_POST);
258
      // die();
259
    if(isset($authorized) && !empty($authorized)){
260
      $_POST['userId'] = $authorized['Id'];
261
      $_POST['cartId'] = $authorized['cartId'];
262
      if($authorized['isLoggedIn'] == 1){
263
        $_POST['isLoggedIn'] = 'true';
264
      }
265
      elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
266
      $_POST['isLoggedIn'] = 'false';
267
      }
268
    }
269
      //end of get cache
270
      $configdata =array();
271
      $configdata = $this->config->item('change_password');
272
      unset($configdata['response'][0]);
273
      $data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata);
274
      //set cache to output or renew cache
275
      if(isset($data['response']['response']['changePassword']))
276
      {
277
        $this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
278
        $data['title'] = 'Saholic';
279
        $data['stylesheet'] = 'auth.css';
280
        $this->layout->view(strtolower(__CLASS__).'/oauth_view',$data);
281
 
282
      }
283
      else
284
      {
285
        $this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
286
        $data['title'] = 'Saholic';
287
        $data['stylesheet'] = 'auth.css';
288
        $this->layout->view(strtolower(__CLASS__).'/oauth_view',$data);
289
      }
290
    }
291
    else{
292
      // echo 'inside else';
293
      // die();
294
      $configdata =array();
295
      $configdata = $this->config->item('change_password');
296
      unset($configdata['response'][1]);
297
      $cachemodule = array('header','footer','response');
298
      $configdata = getCache($configdata,$cachemodule);
299
      $data = array();
300
      $data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$configdata['module']);
301
      $this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
302
      $data['title'] = 'Saholic';
303
      $data['stylesheet'] = 'auth.css';
304
      if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
305
      {
306
        foreach($cachemodule as $cm)
307
        {
308
          if(isset($configdata[$cm]) and !empty($configdata[$cm]))
309
          {
310
            $data['response'][$cm]=$configdata[$cm];
311
          }
312
        }
313
      }
314
      setCache($configdata['module'],$cachemodule,$data['response']);
315
      $this->layout->view(strtolower(__CLASS__).'/changePassword',$data);
316
    }
317
  }
318
 
10582 lgm 319
	function forgotPassword($email)
320
	{
321
 
322
		$authorized = $this->session->userdata('authorized');
323
		if(!isset($authorized['isLoggedIn']) || ($authorized['isLoggedIn'] != 1))
324
		{
325
			if (preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)){
326
       			$configUrl = $this->config->item('forgotpassword');
327
		      	$configUrl = $configUrl['url'];
328
		      	$url = $this->config->item('curl_base_url').$configUrl;
329
		      	$params['emailId'] = $email;
330
		      	$this->mcurl->add_call('forgotPassword','post',$url,$params);
331
		      	$response = $this->mcurl->execute($url);
332
		      	$data['response'] = $response['forgotPassword']['response'];
333
      			print_r($data['response']);
334
       		}
335
		}
336
	}
337
 
338
	//social login process
339
	public function session($provider)
11631 lgm 340
	{
10582 lgm 341
  //   	if (isset($_SERVER['HTTP_REFERER'])) {
342
		// 	if(strpos($_SERVER['HTTP_REFERER'],'session') == false) {
343
  //  				$location = $_SERVER['HTTP_REFERER'];
344
  //  				$this->session->set_userdata('location',$location);
345
		// 	}
346
		// }
347
    	$type = $provider;
348
        $this->load->helper('url_helper');
349
        $social =$this->config->item('oauth_social');
350
 
351
        $this->load->spark('oauth2/0.4.0');
352
 
353
        $provider = $this->oauth2->provider($provider, array(
354
            'id' => $social[$provider]['id'],
355
            'secret' => $social[$provider]['secretkey']
356
 
357
        ));
358
 
359
 
360
        if ( ! $this->input->get('code'))
361
        {
362
        	if($this->input->get('error')) {
363
        		redirect(base_url());
364
        	}else{
365
        		redirect($provider->authorize());
366
        	}
367
            // By sending no options it'll come back here
368
        }
369
        else
370
        {
371
            try
372
            {
373
            	//manage login operation here and redirect to perspective link
374
                $token = $provider->access($_GET['code']);
375
 
376
                $user = $provider->get_user_info($token);
377
                if(strcasecmp('facebook', $type) == 0){
378
                	$_POST['isFacebookUser'] = 'true';
379
                	$_POST['accessToken'] = $user['access_token'];
380
                	$_POST['facebookId'] = $user['uid'];
381
                	$_POST['email'] = $user['email'];
11631 lgm 382
                	if (preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$_POST['email'])) {
383
  						$authorized = $this->session->userdata('authorized');
384
						if(isset($_POST) && !empty($_POST)){
385
							if(isset($authorized) && !empty($authorized)){
386
								$_POST['userId'] = $authorized['Id'];
387
								$_POST['Id'] = $authorized['cartId'];
388
								if($authorized['isLoggedIn'] == 1){
389
									$_POST['isLoggedIn'] = 'true';
390
								}
391
								elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
392
									$_POST['isLoggedIn'] = 'false';
393
								}
10582 lgm 394
							}
11631 lgm 395
						}
396
		                $data['response']=$this->oauth_model->getLogin($this->input->get(),$this->input->post(),$this->config->item('oauth_login'));
397
		                if(isset($data['response']['response']['login']['authorized']))
398
						{
399
							$this->session->set_userdata('authorized',$data['response']['response']['login']['authorized']);
400
							$this->session->set_flashdata(array('msg'=>$data['response']['response']['login']['msg']));
401
							$location = $this->session->userdata('location');
402
							if(isset($location) && !empty($location)){
403
								$this->session->unset_userdata('location');
404
								redirect($location);
10582 lgm 405
							}
11631 lgm 406
							else{
407
								redirect(base_url().$data['response']['response']['login']['redirect']);	
408
							}
10582 lgm 409
						}
11631 lgm 410
						else
411
						{
412
							$inputfile = base_url().'assets/css/auth.less';
413
							$outputfile = base_url().'assets/css/auth.less';
414
							$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
415
							$data['stylesheet'] = 'auth.css';
416
							$this->layout->view(strtolower(__CLASS__).'/oauth_view',$data);
417
						}
418
					}else{
419
						$this->session->set_flashdata(array('msg'=>'Some problem occured.Please try again!'));
420
						redirect(base_url().'login');
10582 lgm 421
					}
422
				}
423
                // Here you should use this information to A) look for a user B) help a new user sign up with existing data.
424
                // If you store it all in a cookie and redirect to a registration page this is crazy-simple.
425
                //echo "<pre>Tokens: ";
426
                //var_dump($token);
427
 
428
                //echo "\n\nUser Info: ";
429
                //var_dump($user);
430
            }
431
 
432
            catch (OAuth2_Exception $e)
433
            {
434
                show_error('That didnt work: '.$e);
435
            }
436
 
437
        }
438
    }
439
 
14868 anikendra 440
    public function autologin() {
441
        $getdata = $this->input->get();
442
        //error_log(print_r($getdata,true));
443
        $configdata = $this->config->item('gosf');
444
        $this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
445
        if(isset($getdata['data']) && !empty($getdata['data'])){
446
            $data = $getdata['data'];
447
        } else{
448
            // $this->layout->view(strtolower(__CLASS__).'/autologin',array('next'=>base_url()));
449
            redirect(base_url().'home');
450
        }
451
        $userData = unserialize(base64_decode($data));
452
        if(isset($getdata['next']) && !empty($getdata['next'])){
453
            $userData['next'] = $getdata['next'];
454
        }
455
        $userData['next'] = str_replace('&next=','',$userData['next']);
456
        $authorized = $this->session->userdata('authorized');
457
        //check if user is already logged in
458
		if(isset($authorized) && !empty($authorized) && $authorized['isLoggedIn'] == 1){
459
			// $this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
460
			redirect(base_url().$userData['next']);
461
		}        
462
        $userData['stylesheet'] = 'auth.css';
463
        $userData['title'] = 'Saholic';
464
        // if(isset($userData['next']) && !empty($userData['next'])){
465
            // $next = $userData['next'];
466
            // $this->session->set_userdata('location',$next);
467
        // }
468
        if(isset($getdata['token']) && !empty($getdata['token'])){
469
            $token = $getdata['token'];
470
        } else{
471
        	// $this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
472
        	redirect(base_url().$userData['next']);
473
        }
474
        $hash = md5("21dtr022015|".$userData['Id']);
475
        //error_log(print_r($hash,true));
476
        if($hash != $token){
477
            // $this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
478
            redirect(base_url().$userData['next']);
479
        }       
480
        $userData['isLoggedIn'] = true;
481
        $this->session->set_userdata('authorized',$userData);
482
        // error_log("cookie ".print_r($_COOKIE,true));
483
        $location = $this->session->userdata('location');
484
        if(isset($location) && !empty($location)){
485
            // error_log("inside condition 6", 0);
486
//          $this->session->unset_userdata('location');
487
            $this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
488
  		} else {
489
       	    // error_log("inside condition 7", 0);
490
            $this->layout->view(strtolower(__CLASS__).'/autologin',array('next'=>base_url()));
491
        }
492
    }
493
 
494
/*
14165 anikendra 495
    public function autologin() {    
14012 anikendra 496
    	$getdata = $this->input->get();
14165 anikendra 497
    	$configdata = $this->config->item('gosf');
498
		$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
14442 anikendra 499
		if(isset($getdata['data']) && !empty($getdata['data'])){
14012 anikendra 500
    		$data = $getdata['data'];
501
    	}else{
14442 anikendra 502
    		$this->layout->view(strtolower(__CLASS__).'/autologin',array('next'=>base_url()));
14456 anikendra 503
    	}    	
504
		$userData = unserialize(base64_decode($data));
505
		if(isset($getdata['next']) && !empty($getdata['next'])){
506
    		$userData['next'] = $getdata['next'];
14012 anikendra 507
    	}
14457 anikendra 508
    	$userData['next'] = str_replace('&next=','',$userData['next']);
14442 anikendra 509
	 	$userData['stylesheet'] = 'auth.css';
510
    	$userData['title'] = 'Saholic';
511
    	if(isset($userData['next']) && !empty($userData['next'])){
512
    		$next = $userData['next'];
513
    		$this->session->set_userdata('location',$next);
514
    	}    	
14012 anikendra 515
    	if(isset($getdata['token']) && !empty($getdata['token'])){
516
    		$token = $getdata['token'];
517
    	}else{
14442 anikendra 518
    		$this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
519
    	}    	    	
14165 anikendra 520
    	$hash = md5("21dtr022015|".$userData['Id']);    	
14012 anikendra 521
    	if($hash != $token){
14442 anikendra 522
    		$this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
14012 anikendra 523
    	}
524
    	if (isset($_SERVER['HTTP_REFERER'])) {
525
			if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
526
   				$redirect = $_SERVER['HTTP_REFERER'];
527
   				$location = $this->session->userdata('location');
528
   				if(isset($location) && $location == 'shipping'){
529
   					$data['location'] = 'shipping';
530
   					$location = base_url().$location;
531
   					$this->session->set_userdata('location',$location);
532
   				}elseif(isset($location) && ($location == 'my-recharges' || $location == 'my-wallet')){
533
   					$location = base_url().$location;
534
   					$this->session->set_userdata('location',$location);
535
   				}else{
536
   					$this->session->set_userdata('location',$redirect);	
14442 anikendra 537
   				}   				
14012 anikendra 538
			}
539
		}
14165 anikendra 540
		$userData['isLoggedIn'] = true;
14012 anikendra 541
		$this->session->set_userdata('authorized',$userData);
542
		$location = $this->session->userdata('location');
543
		if(isset($location) && !empty($location)){
544
			$this->session->unset_userdata('location');
14442 anikendra 545
			$this->layout->view(strtolower(__CLASS__).'/autologin',$userData);
14012 anikendra 546
		}
547
		else{
14442 anikendra 548
			$this->layout->view(strtolower(__CLASS__).'/autologin',array('next'=>base_url()));			
14012 anikendra 549
		}
550
    }
14868 anikendra 551
    */
10582 lgm 552
}
553
 
554
/***** FOR LOGIN AUTHENTICATION *****
555
*    AUTHORIZE ARRAY + AUTHORIZE[AUTHORITY]=SUCCESS
556
*	 FOR SIGN UP - 
557
*
558
*
559
 
560
/* End of file welcome.php */
561
/* Location: ./application/controllers/welcome.php */