Rename method on User model
This commit is contained in:
parent
3c24a166e8
commit
fa1c780786
|
|
@ -317,7 +317,7 @@ class AdminController extends Controller
|
|||
'password' => 'required|min:8|max:16'
|
||||
]);
|
||||
|
||||
$user->changePasswd($request->input('password'));
|
||||
$user->changePassword($request->input('password'));
|
||||
|
||||
return json(trans('admin.users.operations.password.success'), 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class AuthController extends Controller
|
|||
'password' => 'required|min:8|max:32',
|
||||
]);
|
||||
|
||||
$users->get($uid)->changePasswd($validated['password']);
|
||||
$users->get($uid)->changePassword($validated['password']);
|
||||
|
||||
return json(trans('auth.reset.success'), 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class UserController extends Controller
|
|||
if (! $this->user->verifyPassword($request->input('current_password')))
|
||||
return json(trans('user.profile.password.wrong-password'), 1);
|
||||
|
||||
if ($this->user->changePasswd($request->input('new_password'))) {
|
||||
if ($this->user->changePassword($request->input('new_password'))) {
|
||||
event(new UserProfileUpdated($action, $this->user));
|
||||
|
||||
session()->flush();
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class User extends Model
|
|||
* @param string $new_passwd New password that will be set.
|
||||
* @return bool
|
||||
*/
|
||||
public function changePasswd($new_passwd)
|
||||
public function changePassword($new_passwd)
|
||||
{
|
||||
$responses = event(new EncryptUserPassword($new_passwd, $this));
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class AuthControllerTest extends TestCase
|
|||
$this->expectsEvents(Events\UserLoggedIn::class);
|
||||
|
||||
$user = factory(User::class)->create();
|
||||
$user->changePasswd('12345678');
|
||||
$user->changePassword('12345678');
|
||||
$player = factory(App\Models\Player::class)->create(
|
||||
[
|
||||
'uid' => $user->uid
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class UserControllerTest extends TestCase
|
|||
public function testHandleProfile()
|
||||
{
|
||||
$user = factory(User::class)->create();
|
||||
$user->changePasswd('12345678');
|
||||
$user->changePassword('12345678');
|
||||
|
||||
// Invalid action
|
||||
$this->actAs($user)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user