function _gin_login__check_path in Gin Login 8
Helper function to check if we're on the right paths.
2 calls to _gin_login__check_path()
- gin_login_page_attachments_alter in ./
gin_login.module - Page_attachments_alter()
- gin_login_preprocess_html in ./
gin_login.module - Implements hook_preprocess_HOOK() for html.
File
- ./
gin_login.module, line 225 - gin_login.module
Code
function _gin_login__check_path() {
// Get path from Route.
$route = \Drupal::routeMatch()
->getRouteName();
if ($route == 'user.login' || $route == 'user.pass' || $route == 'user.register') {
return TRUE;
}
else {
return FALSE;
}
}