Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit f1594e2

Browse files
committed
adds check if url matches without /us too
1 parent 871bcbe commit f1594e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modules/dosomething/dosomething_user/dosomething_user.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function dosomething_user_form_alter(&$form, $form_state, $form_id) {
258258

259259
// Add extra validation on the edit page, for addresses.
260260
$current_page = $_SERVER['REQUEST_URI'];
261-
if (preg_match('/us\/user\/([0-9]+)\/edit/', $current_page) && $validate_address) {
261+
if ((preg_match('/us\/user\/([0-9]+)\/edit/', $current_page) || preg_match('/user\/([0-9]+)\/edit/', $current_page)) && $validate_address) {
262262
$form['#validate'][] = 'dosomething_user_validate_address_field';
263263
}
264264

0 commit comments

Comments
 (0)