Closed (fixed)
Project:
Login Destination
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2007 at 12:30 UTC
Updated:
9 Apr 2007 at 09:00 UTC
The attached patch makes login_destination work when the path to act upon is an alias.
For quick review also inline here:
--- a/login_destination.module
+++ b/login_destination.module
@@ -128,6 +128,9 @@ function login_destination_apply_redirect() {
if (LOGIN_COND_PAGES == $mode) {
$paths = split("[\n\r]", $cond);
$result = in_array($_GET['q'], $paths);
+ if (!$result) {
+ $result = in_array(drupal_get_path_alias($_GET['q']), $paths);
+ }
} elseif (LOGIN_COND_SNIPPET == $mode) {
$destination = variable_get('ld_url_destination', 'user');
$result = drupal_eval('<?php '. $cond. ' ?>');
should be ready for use ;-)
| Comment | File | Size | Author |
|---|---|---|---|
| login_destination-urlalias.patch | 745 bytes | ray007 |
Comments
Comment #1
ardas commentedNice addition to the module! Thanks.
I have applied patch and commited changes for HEAD and 5.0 versions. They will be available in the development release.
Comment #2
ardas commentedNice addition to the module! Thanks.
I have applied patch and commited changes for HEAD and 5.0 versions. They will be available in the development release.
Comment #3
(not verified) commented