change password
This commit is contained in:
@@ -82,6 +82,17 @@ class usersController extends MY_Controller {
|
||||
$this->json( ['success' => TRUE, 'userID' => $userID] );
|
||||
}
|
||||
|
||||
public function savePassword()
|
||||
{
|
||||
$password = $this->clean_input( 'password' );
|
||||
|
||||
$user = User::find( USERID );
|
||||
|
||||
$saltedPassword = User::getSaltedPassword( $password, $user->salt );
|
||||
|
||||
User::whereId( USERID )->update( ['password' => $saltedPassword] );
|
||||
}
|
||||
|
||||
public function archiveUser( $userID, $status )
|
||||
{
|
||||
User::whereId( $userID )->update( ['archive' => $status] );
|
||||
|
||||
Reference in New Issue
Block a user