A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
/*
|--------------------------------------------------------------------------
| CONFIGURE EMAIL
|--------------------------------------------------------------------------
*/
#$config['protocol'] = 'smtp';
$config['protocol'] = 'sendmail';
$config['mailtype'] = 'html';
/* SEND GRID */
/*
$config['smtp_host'] = 'smtp.sendgrid.net';
$config['smtp_user'] = 'wearemjc';
$config['smtp_pass'] = 'HiredGun1';
$config['smtp_port'] = '587';
*/
/* GMAIL */
#$config['smtp_host'] = 'smtp.mandrillapp.com';
#$config['smtp_user'] = 'milton@wearemjc.com';
#$config['smtp_pass'] = 'nd5QDbw1tN3IUSo4hNwNJg';
#$config['smtp_port'] = '587';
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
$config['validate'] = TRUE;
class User_model extends CI_Model {
function User_model(){
parent::__construct();
}
public function returnLoggedInUser($id = null)
{
$query = "select id, email, username, firstName, lastName from wwgt_users where id = '$id'";
$results = $this->db->query($query);
if($results->num_rows() >0){
return $results->result();
} else {
return array("id"=>"", "email"=>"", "username"=>"", "firstName"=>"", "lastName"=>"");
}
}
public function returnUserInfoByEmail($email = null)
{
$query = "select * from wwgt_users where email = '$email'";
$results = $this->db->query($query);
if($results->num_rows() >0){
$results = $results->result();
return $results[0];
} else {
return false;
}
}
public function activateUser($activationCode){
$query = "update wwgt_users set activated = 'yes' where activationCode = '$activationCode'";
$this->db->query($query);
}
public function checkLogin($username, $password){
$password = md5($password);
$query = "select username from wwgt_users where username = '$username' and password = '$password'";
$results = $this->db->query($query);
if($results->num_rows() >0){
return true;
} else {
return false;
}
}
public function isActiveUser($activationCode){
$query = "select activationCode from wwgt_users where activationCode = '$activationCode' and activated = 'yes'";
$results = $this->db->query($query);
if($results->num_rows() >0){
return true;
} else {
return false;
}
}
public function isRegistered($email){
$query = "select * from wwgt_users where email = '$email'";
$results = $this->db->query($query);
if($results->num_rows() >0){
return true;
} else {
return false;
}
}
public function isLoggedIn(){
$sessionID = $this->session->userdata('username');
if(strlen($sessionID)>0){
return true;
} else {
return false;
}
}
}