Pannous

Pannous Commit Details

Date:2018-04-25 20:12:21 (2 years 3 months ago)
Author:Grégory Soutadé
Branch:master
Commit:c7fded452a3039b0d75a98bf6cd32ef79de6f2a3
Parents: f5a18a75d4e25f10b216318bdd3e8a25b20cd3a4
Message:Force password update in User controller

Changes:
A.gitignore (full)
Mfuel/app/classes/controller/users.php (2 diffs)

File differences

.gitignore
1
2
3
4
5
6
fuel/app/logs/*
*~
fuel/app/config/simpleauth.php
fuel/app/config/pannous.php
fuel/app/config/db.php
fuel/app/config/config.php
fuel/app/classes/controller/users.php
167167
168168
169169
170
170
171171
172172
173173
......
180180
181181
182182
183
184
185183
186
187
188
184
189185
190
191
192
193
194
195
196
186
187
188
189
190
191
192
193
194
195
196
197
198
197199
200
201
202
198203
199
200
201
204
205
202206
203207
204208
if (isset($in_data['delete']))
Response::redirect('users/' . $target_user->id . '/delete');
$form->add_model('Model_Users', $in_data);
if ($editor_group == Model_Users::$ROLE_USER)
{
if (!$validation->error())
{
if ($in_data['password'] != "")
Auth::update_user($in_data, $target_user->username);
else
{
$in_data = Input::post(
array('email', 'username', 'valid',
'group', 'public_key'));
$passwords = array("password" => $in_data["password"]);
if ($editor_group == Model_Users::$ROLE_USER)
{
$in_data['valid'] = true;
$in_data['group'] = Model_Users::$ROLE_USER;
}
$target_user->set($in_data);
$target_user->save();
$data['notice'] = 'User updated';
$passwords["old_password"] = $in_data["old_password"];
else
$passwords["force_new_password"] = true;
Auth::update_user($passwords, $target_user->username);
}
$in_data = Input::post(
array('email', 'username', 'valid',
'group', 'public_key'));
if ($editor_group == Model_Users::$ROLE_USER)
{
$in_data['valid'] = true;
$in_data['group'] = Model_Users::$ROLE_USER;
}
$target_user->set($in_data);
$target_user->save();
$data['notice'] = 'User updated';
/* Group lowered -> reconnect */
if ($editor_group > $in_data['group'] &&
$editor_id == $target_user->id)
/* User changed -> reconnect */
if ($editor_id == $target_user->id)
{
Auth::logout();
Auth::force_login($target_user->id);

Archive Download the corresponding diff file

Branches