Permalink
Browse files

Update API/CommonFunctions.php

  • Loading branch information...
1 parent 782831e commit 33d5457e14272151dda814ece7b05ccb7624eb30 @evantahler committed Mar 7, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 API/CommonFunctions.php
View
18 API/CommonFunctions.php
@@ -199,6 +199,24 @@ function only_table_columns($DATA, $Table)
return $CleanData;
}
+function SessionAutenticate($DATA = null){
+ global $PARAMS;
+ if ($DATA == null){$DATA = $PARAMS;}
+
+ if($DATA["KEY"]==null){
+ return "KEY is required for this action";
+ }else{
+ list($msg, $ReturnedUsers) = _VIEW("sessions",array(
+ "KEY" => $DATA['KEY'],
+ ));
+ }
+ if($msg != true || count($ReturnedUsers) != 1){
+ return "KEY not found";
+ }else{
+ return true;
+ }
+}
+
function AuthenticateUser($DATA = null)
{
// (UserID || ScreenName || EMail) + (Password || PasswordHash) || (Hash + Rand + UserID)

0 comments on commit 33d5457

Please sign in to comment.