summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Foreign_user.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/classes/Foreign_user.php b/classes/Foreign_user.php
index 25a6ac979..6dbad9aa2 100644
--- a/classes/Foreign_user.php
+++ b/classes/Foreign_user.php
@@ -23,6 +23,22 @@ class Foreign_user extends DB_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+ function getForeignUser($user_id, $service) {
+
+ $fuser = DB_DataObject::factory('foreign_user');
+ $fuser->whereAdd("service = $service");
+ $fuser->whereAdd("user_id = $user_id");
+ $fuser->limit(1);
+
+ if ($fuser->find()) {
+ $fuser->fetch();
+ return $fuser;
+ }
+
+ return NULL;
+ }
+
+
static function save($fields) {
extract($fields);