/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/models/user.php

  • Committer: elof.bigestans at gmail
  • Date: 2013-05-24 14:10:14 UTC
  • mfrom: (102 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 107.
  • Revision ID: elof.bigestans@gmail.com-20130524141014-8pni44bog1rf5ijp
Merged from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                        $hash = $this->getSaltedHash($password);
52
52
        
53
53
                        //Query-structure
54
 
                        $this->db->select('userName, name, passwd, userType, ssn'); // Tog bort firstLogin här.
 
54
                        $this->db->select('userName, name, passwd, userType, ssn, activeCourse'); // Tog bort firstLogin här.
55
55
                        $this->db->from('Users');
56
56
                        $this->db->where('userName', $username);
57
57
                        $this->db->where('passwd', $hash);
71
71
                                                'name' => $row->name,
72
72
                                                'usertype' => $row->userType,
73
73
                                                'ssn' => $row->ssn,
 
74
                                                'activeCourse' => $row->activeCourse, 
74
75
                                        //      'firstLogin' => $row->firstLogin
75
76
                                        );
76
77
                                }
384
385
                        
385
386
                        return FALSE;
386
387
                }
 
388
                
 
389
                /*
 
390
                * This function fetches the active course from the user table
 
391
                */
 
392
                public function getActiveCourse(){
 
393
                        if($this->isLoggedIn()) {
 
394
                                $temp = $this->session->userdata('authenticated');
 
395
                                return $temp['activeCourse'];   
 
396
                        }
 
397
                        
 
398
                        return FALSE;
 
399
                }
387
400
        }
388
401
        
389
402
?>
 
 
b'\\ No newline at end of file'