public function Utility::faqAskValidToken in FAQ_Ask 8
Helper function to validate token.
1 call to Utility::faqAskValidToken()
- FaqAskController::askAnswerViewSettings in src/
Controller/ FaqAskController.php - This function is called when an expert selects a question to answer.
File
- src/
Utility.php, line 31 - Contains \Drupal\faq_ask\Utility.
Class
- Utility
- Contains static helper functions for FAQ module.
Namespace
Drupal\faq_askCode
public function faqAskValidToken($token, $value = '', $skip_anonymous = FALSE) {
$user = \Drupal::currentUser();
return $skip_anonymous && $user
->id() == 0 || $token == Utility::_faq_ask_get_token($value);
}