Hi,

I'm trying to figureout how to make a bypass when I call pathauto_user_update_alias($account, 'update'); and the variable_get('pathauto_update_action', 2) return = 0;

I need the update_action 0 for the rest (node, blog, etc) but for the user I need to set it to 2.

Any option to setup a temp var o option to update user alias?.

thanks.

Comments

dave reid’s picture

Status: Active » Fixed

You can just do this:

$original_update_action = variable_get('pathauto_update_action', 2);
$GLOBALS['conf']['pathauto_update_action'] = 2;
pathauto_user_update_alias($account, 'update');
$GLOBALS['conf']['pathauto_update_action'] = $original_update_action;

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.