Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added get_users_meta_module to Social_auth

  • Loading branch information...
commit 0d684f224774b9a93812a1528d28ff77a872e3a7 1 parent 162aa26
@bnvk bnvk authored
View
9 application/libraries/Social_auth.php
@@ -387,9 +387,9 @@ function profile($email)
return $this->ci->auth_model->profile($email);
}
- function get_users($parameter, $value)
+ function get_users($parameter, $value, $details=FALSE)
{
- return $this->ci->auth_model->get_users($parameter, $value);
+ return $this->ci->auth_model->get_users($parameter, $value, $details);
}
function get_user($parameter, $value, $details=FALSE)
@@ -432,6 +432,11 @@ function get_user_meta_module($user_id, $module)
return $this->ci->auth_model->get_user_meta_module($user_id, $module);
}
+ function get_users_meta_module($module)
+ {
+ return $this->ci->auth_model->get_users_meta_module($module);
+ }
+
function get_user_meta_meta($user_id, $meta)
{
return $this->ci->auth_model->get_user_meta_meta($user_id, $meta);
View
23 application/models/auth_model.php
@@ -520,11 +520,20 @@ function remember_user($user)
return FALSE;
}
- function get_users($parameter, $value)
+ function get_users($parameter, $value, $details)
{
if (in_array($parameter, array('user_level_id','active')))
- {
- $this->db->select('users.user_id, user_level_id, username, gravatar, name, image, time_zone, privacy, language, geo_enabled, created_on');
+ {
+ if ($details)
+ {
+ $select = 'user_id, user_level_id, username, salt, email, gravatar, phone_number, name, image, time_zone, privacy, language, geo_enabled, consumer_key, consumer_secret, token, token_secret, activation_code, forgotten_password_code, active, remember_code, created_on';
+ }
+ else
+ {
+ $select = 'user_id, user_level_id, username, gravatar, name, image, time_zone, privacy, language, geo_enabled, active, created_on';
+ }
+
+ $this->db->select($select);
$this->db->from('users');
$this->db->where($parameter, $value);
$result = $this->db->get();
@@ -622,6 +631,14 @@ function get_user_meta_module($user_id, $module)
return $result->result();
}
+ function get_users_meta_module($module)
+ {
+ $this->db->select('*');
+ $this->db->from('users_meta');
+ $this->db->where('module', $module);
+ $result = $this->db->get();
+ return $result->result();
+ }
function get_user_meta_meta($user_id, $meta)
{
$this->db->select('*');
Please sign in to comment.
Something went wrong with that request. Please try again.