diff --git a/fuel/modules/fuel/libraries/Fuel_modules.php b/fuel/modules/fuel/libraries/Fuel_modules.php index 2e2e1c3e6..505e58f32 100644 --- a/fuel/modules/fuel/libraries/Fuel_modules.php +++ b/fuel/modules/fuel/libraries/Fuel_modules.php @@ -248,7 +248,7 @@ public function get($module = NULL, $include_advanced = TRUE) $modules = $this->get(NULL, FALSE); foreach($modules as $key => $mod) { - if (strtolower($mod->info('model_name')) == $module OR ($has_uri AND $mod->info('module_uri') == $module)) + if (strtolower($mod->info('model_name')) == $module OR (!empty($has_uri) AND $mod->info('module_uri') == $module)) { $module = $key; break; @@ -1138,4 +1138,4 @@ public function __get($var) } /* End of file Fuel_modules.php */ -/* Location: ./modules/fuel/libraries/fuel/Fuel_modules.php */ \ No newline at end of file +/* Location: ./modules/fuel/libraries/fuel/Fuel_modules.php */ diff --git a/fuel/modules/fuel/models/fuel_users_model.php b/fuel/modules/fuel/models/fuel_users_model.php index 71735b090..0ba82a1b4 100644 --- a/fuel/modules/fuel/models/fuel_users_model.php +++ b/fuel/modules/fuel/models/fuel_users_model.php @@ -537,11 +537,11 @@ public function on_before_save($values) // added here instead of on_before_clean in case of any cleaning that may alter the salt and password values - if (!empty($values['new_password'])) + if (!empty($values['password'])) { $values['salt'] = substr($this->salt(), 0, 32); - $values['password'] = $this->salted_password_hash($values['new_password'], $values['salt']); + $values['password'] = $this->salted_password_hash($values['password'], $values['salt']); } return $values; @@ -683,4 +683,4 @@ function get_name() return $this->first_name.' '.$this->last_name; } -} \ No newline at end of file +}