Subversion Repositories SmartDukaan

Rev

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

Rev 15085 Rev 15188
Line 594... Line 594...
594
		    $next = $this->Session->read('next');
594
		    $next = $this->Session->read('next');
595
		    if (!empty($next)) {
595
		    if (!empty($next)) {
596
				header('location:' . $next);
596
				header('location:' . $next);
597
				exit();
597
				exit();
598
		    }
598
		    }
599
		    $user = $this->User->read(null, $this->Auth->User('id'));		 
599
		    $user = $this->User->read(null, $this->Auth->User('id'));		 		    
600
		    if ($user['User']['group_id'] == 2) {
-
 
601
				$this->redirect(array('controller' => 'administration', 'action' => 'dashboard'));
-
 
602
				exit();
-
 
603
		    }
-
 
604
			if ($user['User']['group_id'] == 1) {
600
			if ($user['User']['group_id'] == 1) {
605
				$this->redirect(array('controller' => 'deals', 'action' => 'mine?user_id='.$user['User']['id']));
601
				$this->redirect(array('controller' => 'deals', 'action' => 'mine?user_id='.$user['User']['id']));
606
				exit();
602
				exit();
607
			}
603
			}
-
 
604
			else if ($user['User']['group_id'] >= 2) {
-
 
605
				$this->redirect(array('controller' => 'administration', 'action' => 'dashboard'));
-
 
606
				exit();
-
 
607
		    }
608
		} else {
608
		} else {
609
		    if (!empty($this->data)) {                
609
		    if (!empty($this->data)) {                
610
				$this->Session->setFlash(__('Invalid username or password'),'error_message');
610
				$this->Session->setFlash(__('Invalid username or password'),'error_message');
611
		    }
611
		    }
612
		}
612
		}