array( "message" => "Authentication error" ))); exit(); } $util = new \OCA\Encryption\Util(new \OC_FilesystemView('/'), \OCP\User::getUser()); if ( $recoveryPassword && ! $util->checkRecoveryPassword($recoveryPassword) ) { OC_JSON::error(array("data" => array( "message" => "Wrong recovery admin password. Please check the password and try again." ))); }elseif(!is_null($password) && OC_User::setPassword( $username, $password, $recoveryPassword )) { OC_JSON::success(array("data" => array( "username" => $username ))); } else{ OC_JSON::error(array("data" => array( "message" => "Unable to change password" ))); } error_log("bliub");