Skip to content

Commit

Permalink
changed auth
Browse files Browse the repository at this point in the history
  • Loading branch information
roppa committed Jan 29, 2012
1 parent a1fba1f commit 76fb6d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| path to your installation.
|
*/
$config['base_url'] = 'http://localhost/github/Rabbit/';
$config['base_url'] = 'http://project-rabbit/';
//added these to config so we can change them system wide if we want to move them somewhere else
$config['image_path'] = 'img/';
$config['thumb_path'] = 'img/thumbs/';
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function update_profile()

$this->form_validation->set_rules('first_name', 'first_name', 'trim|required|xss_clean');
$this->form_validation->set_rules('about_me', 'about_me', 'trim|required|xss_clean');
$this->form_validation->set_rules('country', 'country', 'trim|xss_clean');
$this->form_validation->set_rules('sex', 'sex', 'trim|xss_clean');
$this->form_validation->set_rules('website', 'website', 'trim|xss_clean');
$this->form_validation->set_rules('last_name', 'last_name', 'trim|xss_clean');
$this->form_validation->set_error_delimiters('<span class="help-inline">', '</span>');
Expand All @@ -500,7 +500,7 @@ function update_profile()
'first_name' => $this->form_validation->set_value('first_name'),
'last_name' => $this->form_validation->set_value('last_name'),
'about_me' => $this->form_validation->set_value('about_me'),
'country' => $this->form_validation->set_value('country'),
'sex' => $this->form_validation->set_value('sex'),
'website' => $this->form_validation->set_value('website'));

if($this->profiles_model->update_profile($user_id, $updated_values))
Expand Down
6 changes: 6 additions & 0 deletions application/models/artists_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ function __construct()
*/
function get_user($user_id)
{

if(!is_numeric ($user_id))
{
//the username would have been used instead
}

$properties = array();

$query = $this->db->query("SELECT users.username, users.created, users.modified, users.last_login, users.id, user_profiles.website, user_profiles.first_name, user_profiles.last_name, user_profiles.avatar_filename, user_profiles.status, user_profiles.sex, user_profiles.about_me, user_profiles.lat, user_profiles.lon FROM users JOIN user_profiles ON users.id = user_profiles.user_id WHERE users.id = " . (int) $user_id);
Expand Down

0 comments on commit 76fb6d0

Please sign in to comment.