rss MDL-22204 added library functions to allow the user to get a new rss token

This commit is contained in:
Andrew Davis
2010-05-12 06:48:59 +00:00
parent a1dc03b5eb
commit ffa3bfb36f
2 changed files with 16 additions and 4 deletions
+13
View File
@@ -2528,6 +2528,19 @@ function create_user_key($script, $userid, $instance=null, $iprestriction=null,
return $key->value;
}
/**
* Delete the user's new private user access keys for a particular script.
*
* @global object
* @param string $script unique target identifier
* @param int $userid
* @return void
*/
function delete_user_key($script,$userid) {
global $DB;
$DB->delete_records('user_private_key', array('script'=>$script, 'userid'=>$userid));
}
/**
* Gets a private user access key (and creates one if one doesn't exist).
*