Example #1
0
 /**
  * Return loaded AuthenticationType with the given ID.
  * @param int $authTypeID
  * @throws \Exception
  * @return AuthenticationType
  */
 public static function getByID($authTypeID)
 {
     $db = Loader::db();
     $row = $db->GetRow('SELECT * FROM AuthenticationTypes where authTypeID=?', array($authTypeID));
     if (!$row) {
         throw new Exception(t('Invalid Authentication Type ID'));
     }
     $at = AuthenticationType::load($row);
     $at->loadController();
     return $at;
 }