Ignore:
Timestamp:
Sep 13, 2013, 9:26:31 PM (11 years ago)
Author:
chronos
Message:
  • Added: Access to RSS channels restricted to higher level user with API token.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/User.php

    r579 r585  
    153153    else return($this->Role >= $Licence);   
    154154  }
     155 
     156  function CheckToken($Licence, $Token)
     157  {
     158    $DbResult = $this->System->Database->select('APIToken', 'User', '`Token`="'.$Token.'"');
     159    if($DbResult->num_rows > 0)
     160    {
     161      $DbRow = $DbResult->fetch_assoc();
     162      $DbResult2 = $this->System->Database->select('User', 'GM', '`ID`="'.$DbRow['User'].'"');
     163      $DbRow2 = $DbResult2->fetch_assoc();
     164      return($DbRow2['GM'] >= $Licence);
     165    } else return(false);   
     166  }
    155167
    156168  function GetPasswordSalt()
Note: See TracChangeset for help on using the changeset viewer.