diff --git flag.inc flag.inc
index 02ff574..942bf8a 100644
--- flag.inc
+++ flag.inc
@@ -596,43 +596,58 @@ class flag_flag {
 
     return TRUE;
   }
 
   /**
-   * Returns TRUE if a certain user has flagged this content.
+   * Determines if a certain user has flagged this content.
    *
    * Thanks to using a cache, inquiring several different flags about the same
    * item results in only one SQL query.
    *
    * @param $uid
    *   Optional. The user ID whose flags we're checking. If none given, the
    *   current user will be used.
+   *
+   * @return
+   *   TRUE if the content is flagged, FALSE otherwise.
+   *
+   *   However, by setting the $return_record parameter to TRUE, the
+   *   {flag_content} record is returned if the content is flagged. This makes
+   *   it possible, e.g., to find out the 'fcid' value of the flagging.
    */
-  function is_flagged($content_id, $uid = NULL, $sid = NULL) {
+  function is_flagged($content_id, $uid = NULL, $sid = NULL, $return_record = FALSE) {
     $uid = $this->global ? 0 : (!isset($uid) ? $GLOBALS['user']->uid : $uid);
     $sid = $this->global ? 0 : (!isset($sid) ? flag_get_sid($uid) : $sid);
 
     // flag_get_user_flags() does caching.
     $user_flags = flag_get_user_flags($this->content_type, $content_id, $uid, $sid);
-    return isset($user_flags[$this->name]);
+    if (isset($user_flags[$this->name])) {
+      return $return_record ? $user_flags[$this->name] : TRUE;
+    }
+    else {
+      return FALSE;
+    }
   }
 
   /**
-   * Returns TRUE if a certain user has flagged this content.
+   * Determines if a user has flagged this content.
    *
    * You probably shouldn't call this raw private method: call the
    * is_flagged() method instead.
    *
    * This method is similar to is_flagged() except that it does direct SQL and
    * doesn't do caching. Use it when you want to not affect the cache, or to
    * bypass it.
    *
+   * @return
+   *   If the content is flagged, returns the 'fcid' column. Else, returns FALSE.
+   *
    * @private
    */
   function _is_flagged($content_id, $uid, $sid) {
     return db_select('flag_content', 'fc')
-      ->fields('fc', array('fid'))
+      ->fields('fc', array('fcid'))
       ->condition('fid', $this->fid)
       ->condition('uid', $uid)
       ->condition('sid', $sid)
       ->condition('content_id', $content_id)
       ->execute()
@@ -643,10 +658,13 @@ class flag_flag {
    * A low-level method to flag content.
    *
    * You probably shouldn't call this raw private method: call the flag()
    * function instead.
    *
+   * @return
+   *   The 'fcid' column of the new {flag_content} record.
+   *
    * @private
    */
   function _flag($content_id, $uid, $sid) {
     $fcid = db_insert('flag_content')
       ->fields(array(
@@ -666,10 +684,14 @@ class flag_flag {
    * A low-level method to unflag content.
    *
    * You probably shouldn't call this raw private method: call the flag()
    * function instead.
    *
+   * @return
+   *   If the content was flagged, returns the value of the now deleted 'fcid'
+   *   column. Else, returns FALSE.
+   *
    * @private
    */
   function _unflag($content_id, $uid, $sid) {
     $fcid = db_select('flag_content', 'fc')
       ->fields('fc', array('fcid'))
@@ -1254,13 +1276,13 @@ class flag_node extends flag_flag {
   function flag($action, $content_id, $account = NULL, $skip_permission_check = FALSE) {
     $content_id = $this->get_translation_id($content_id);
     return parent::flag($action, $content_id, $account, $skip_permission_check);
   }
 
-  function is_flagged($content_id, $uid = NULL, $sid = NULL) {
+  function is_flagged($content_id, $uid = NULL, $sid = NULL, $return_record = FALSE) {
     $content_id = $this->get_translation_id($content_id);
-    return parent::is_flagged($content_id, $uid, $sid);
+    return parent::is_flagged($content_id, $uid, $sid, $return_record);
   }
 
   function get_labels_token_types() {
     return array('node');
   }
