CI =& get_instance(); $this->cognito_properties = array('region'=>'ap-south-1','version'=>'latest','credentials' => array( 'key' =>$this->CI->config->item('cognito_resource_key'), 'secret' => $this->CI->config->item('cognito_resource_secret') )); $this->client = CognitoIdentityProviderClient::factory($this->cognito_properties); // echo "Called"; // $this->setCors('lender8');die(); } public function adminResetPassword($user_name) { $result = $this->client->adminResetUserPassword([ 'UserPoolId' => $this->CI->config->item('sine_egde_pool_id'), // REQUIRED 'Username' => $user_name, // REQUIRED ]); print_r($result); } public function adminSetUserPassword($user_name) { //print_r('adminSetUserPassword'); $result = $this->client->adminSetUserPassword([ 'Password' => 'temp1234', // REQUIRED 'Permanent' => false, 'UserPoolId' => $this->CI->config->item('lender_pool_id'), // REQUIRED 'Username' => $user_name, // REQUIRED ]); print_r($result); } } ?>